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

Comments

@icewind1991
Copy link
Member

commented Oct 12, 2015

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

This comment has been minimized.

Copy link
Contributor

commented Oct 12, 2015

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

This comment has been minimized.

Copy link
Member Author

commented Oct 12, 2015

<?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

Quota: handle special negative value for the quota #3940
Don't show a progress bar if there is an unkown or unlimited total
@ogoffart

This comment has been minimized.

Copy link
Collaborator

commented Oct 29, 2015

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

This comment has been minimized.

Copy link
Member Author

commented Oct 29, 2015

Now works as expected, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.