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

Cycle detection in discover? #66

Open
kain88-de opened this issue May 31, 2016 · 4 comments
Open

Cycle detection in discover? #66

kain88-de opened this issue May 31, 2016 · 4 comments
Labels
Milestone

Comments

@kain88-de
Copy link
Contributor

Is there a detection for symbolic link cycles in the discover function?

@dotsdl
Copy link
Member

dotsdl commented Jun 2, 2016

datreant.core.discover doesn't follow symbolic links since it uses scandir.walk with followlinks=False, so this shouldn't be an issue at all. Have you experienced otherwise?

@kain88-de
Copy link
Contributor Author

I haven't tested it. I just read it in the paper and remembered that a colleague can't use pycharm because he has symbolic link cycles.

But I can't find this information in the docs. I think it would be nice to document this behavior otherwise someone who uses symbolic links might be surprised he can't discover his Treants anymore.

@dotsdl
Copy link
Member

dotsdl commented Jun 24, 2016

@kain88-de agreed. In fact, we'll go one further and add a followlinks kwarg to discover that lets links be followed if desired. Not sure if scandir.walk does any loop detection on its own, but will check. Not sure if we should do loop detection ourselves if it doesn't, but probably should in the interests of being useful.

@kain88-de
Copy link
Contributor Author

I don't know if scandir has any loop detection. I doubt it though. I also wouldn't say we should do our own. cyclic links are a problem are a problem for a lot of people and the cycle can be loooong.

I like the option to follow symbolic links though. But a warning about cyclic links in the docs though first. Then we can still see if we get generate some evil cyclic links if we really want to.

@dotsdl dotsdl added this to the 0.8.0 milestone Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Release 0.8.0
In triage
Development

No branches or pull requests

2 participants