Skip to content

Commit

Permalink
Merge pull request #15 from nextcloud/quotaUnavailable
Browse files Browse the repository at this point in the history
Extend quota to reflect state: quota limit not supported by server
  • Loading branch information
AndyScherzinger authored Aug 31, 2016
2 parents 7d2acf4 + 7f41e40 commit dcd45ac
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public double getRelative() {
*/
public static final long SPACE_UNLIMITED = -3;

/**
* Quota return value for quota information not available.
*/
public static final long QUOTA_LIMIT_INFO_NOT_AVAILABLE = Long.MIN_VALUE;

// OCS Route
private static final String OCS_ROUTE = "/ocs/v1.php/cloud/users/";

Expand Down Expand Up @@ -144,7 +149,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {
quotaValue = quota.getLong(NODE_QUOTA);
} catch (JSONException e) {
Log_OC.i(TAG, "Legacy server in use < Nextcloud 9.0.54");
quotaValue = SPACE_UNKNOWN;
quotaValue = QUOTA_LIMIT_INFO_NOT_AVAILABLE;
}

// Result
Expand Down

0 comments on commit dcd45ac

Please sign in to comment.