Skip to content

Conversation

@ethanwharris
Copy link
Contributor

Fixes #591

  • By returning info['type'] = 'link' for symbolic links, LocalFileSystem.info actually breaks more than just isdir, e.g. isfile, walk etc. are all affected too.
  • This changes LocalFileSystem.info['type'] to follow symlinks correctly and always give either directory or file.
  • Adds an additional LocalFileSystem.info['islink'] flag to enable checking for links without breaking the rest.

Let me know if this fix is acceptable, happy to implement an alternative if preferred 😃

@martindurant
Copy link
Member

Yes, I think this is fine. You are right that it probably best to keep close to what os does.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LocalFileSystem.isdir inconsistent with os.path.isdir with symbolic links

2 participants