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

Incorrect handling of unlimited/unknown disk quota #3940

Closed
icewind1991 opened this issue Oct 12, 2015 · 4 comments
Closed

Incorrect handling of unlimited/unknown disk quota #3940

icewind1991 opened this issue Oct 12, 2015 · 4 comments
Assignees
Labels
Enhancement ReadyToTest QA, please validate the fix/enhancement
Milestone

Comments

@icewind1991
Copy link

Some external storage backend either don't provide quota information or provide unlimited storage.

When quota information is requested for such a storage oC will return -2 for unknown free space and -3 for unlimited free space (-1 is for not computed).

The sync client does't handle these values and shows the quota being full in the user interface

@dragotin
Copy link
Contributor

To get quota information, the client does this kind of request:

<?xml version='1.0' encoding='UTF-8'?> 
<d:propfind xmlns:d="DAV:">
   <d:prop>
     <d:quota-available-bytes/>
     <d:quota-used-bytes/>
   </d:prop>
</d:propfind>

which would typically be answered like this:

<?xml version='1.0' encoding='utf-8'?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/oc/remote.php/webdav/</d:href>
    <d:propstat>
      <d:prop>
        <oc:id>00000009ocsutmmj6g6t</oc:id>
        <oc:permissions>RDNVCK</oc:permissions>
        <oc:size>208659510</oc:size>
        <d:quota-available-bytes>1055690</d:quota-available-bytes>
        <d:quota-used-bytes>208659510</d:quota-used-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Where would the -1, -2 or -3 show up? As a quota value?
@icewind1991

@icewind1991
Copy link
Author

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/owncloud/remote.php/webdav/</d:href>
    <d:propstat>
      <d:prop>
        <d:quota-available-bytes>-3</d:quota-available-bytes>
        <d:quota-used-bytes>15192979931</d:quota-used-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

@dragotin dragotin added this to the 2.1-next milestone Oct 12, 2015
@ogoffart ogoffart self-assigned this Oct 23, 2015
ogoffart added a commit that referenced this issue Oct 29, 2015
Don't show a progress bar if there is an unkown or unlimited total
@ogoffart ogoffart added the ReadyToTest QA, please validate the fix/enhancement label Oct 29, 2015
@ogoffart
Copy link
Contributor

I tested by hardcoding the value in the code. I don't know how to ge the server to actually return these special values

@icewind1991
Copy link
Author

Now works as expected, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ReadyToTest QA, please validate the fix/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants