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

Fix symlink handling in OSFS #431

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Fix symlink handling in OSFS #431

wants to merge 8 commits into from

Conversation

althonos
Copy link
Member

@althonos althonos commented Sep 26, 2020

Type of changes

  • Bug fix

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Closes #425

Changes the expected behaviour of FS.islink in tests so that is never raises ResourceNotFound, to be consistent with FS.isfile and FS.isdir.

Changes the base FS.islink implementation to one that uses FS.gettype to check if the resource type is symlink.

Closes #411

Fixes the behaviour of the following OSFS methods so that they work as expected:

  • OSFS.islink(path): returns True on existing path to a symlink, False otherwise
  • OSFS.gettype(path): returns ResourceType.symlink is the path maps to a symlink (not the case before)
  • OSFS.getinfo(path): works even if path is a dangling symlink (TODO)
  • OSFS.scandir(dir): works even if dir contains a dangling symlink (TODO)

@althonos althonos self-assigned this Sep 26, 2020
@althonos
Copy link
Member Author

ping @mjpieters, @dargueta

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