Skip to content

Directory methods fixes #7

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Directory methods fixes #7

wants to merge 2 commits into from

Conversation

blootsvoets
Copy link

On our DAV server, two functions on directories failed:

  1. check() returned False when passed dav.check('/path/to/mydir'), where mydir is a directory
  2. is_dir() raised a MethodNotSupported error on files

Fixed these two issues by

  1. removing trailing slashes from both the path and urn before comparing
  2. looking for a resourcetype/collection directly, thus resources without a resource type will not fail but return false.

Could you please consider these changes for a next release?

Previously, '/path/to/mydir' would return false for
an existing directory. Now it returns true.
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.

1 participant