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

Return quota information based on query path #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vigilans
Copy link

This PR is the implementation of miquels/webdav-handler-rs#25.

It will append the queried path to self.basedir, so the quota query is based on the actual query path, instead of the root path.

Explanations from miquels/webdav-handler-rs#25 :

There are many cases when we use a folder like /media to export as webdav file root, but subfolders in /media are mounted with other filesystems:

/media -> rootfs
/media/dirA -> external ext4 system
/media/dirB -> external NTFS system

Currently, get_quota only collects quota information of root folder (the /media), even the client is querying quota information of path /media/dirA or /media/dirB.

When using clients like RaiDrive in Windows, it will report disk usage just like normal physical disks, and we expect it to show the correct disk usage of drive /media/dirA or /media/dirB (maybe some TBs large), but not the /media from rootfs `(maybe just tens of GBs).

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