elisemercury / Duplicate-Image-Finder

difPy - Python package for finding duplicate or similar images within folders
https://difpy.readthedocs.io
MIT License
420 stars 65 forks source link

Use python 3.6 compatible directory nesting check #56

Closed guites closed 1 year ago

guites commented 1 year ago

This PR is meant to fix #52 which seems to affect people running python versions smaller than 3.9, as described in https://github.com/elisemercury/Duplicate-Image-Finder/issues/52#issuecomment-1433278228

The contribution guide mentions openning the PR to the development branch, but I didn't find it.

I tested this in both macos and debian (via docker container). I don't have a windows machine available for testing, but it should work properly, the docs mention that os.path.commonpath is available for windows and unix (source)

This should work for python versions as low as 3.6.

Thanks for the project!!

ps. I based my solution on this great so post https://stackoverflow.com/a/37095733

elisemercury commented 1 year ago

Hi @guites,

Thanks a lot for your efforts in fixing this issue and making difPy better. You input has been very valuable and was considered in the update of difPy v3.0.0.

Again thanks and all the best, Elise