Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally follow symlinks to directories #16

Closed
israel-lugo opened this issue Sep 20, 2016 · 3 comments
Closed

Optionally follow symlinks to directories #16

israel-lugo opened this issue Sep 20, 2016 · 3 comments
Assignees
Milestone

Comments

@israel-lugo
Copy link
Owner

It would be nice to have the possibility of following symbolic links to (sub)directories. Currently, we don't follow them.

find_duplicates_in_dirs could have a new follow_links parameter, defaulting to False for compatibility.

@israel-lugo
Copy link
Owner Author

We can implement this in index_files_by_size. It can get the follow_links value from find_duplicates_in_dirs, and pass it on to os.walk as the followlinks argument.

@israel-lugo
Copy link
Owner Author

This needs unit testing. Test that follow_links=False doesn't follow links, and that follow_links=True does. How do we do this portably, e.g. what to do on systems that don't support symlinks?

I suppose we could detect if the system supports symlinks somehow, and change our expectations accordingly.

@israel-lugo
Copy link
Owner Author

Actually, make that follow_dirlinks. What we want to influence is explicitly only links to directories, not links to files. Cf man rsync for a similar example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant