Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcd45acd authored by Andy Scherzinger's avatar Andy Scherzinger Committed by GitHub
Browse files

Merge pull request #15 from nextcloud/quotaUnavailable

Extend quota to reflect state: quota limit not supported by server
parents 7d2acf4a 7f41e406
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -109,6 +109,11 @@ public class RemoteGetUserQuotaOperation extends RemoteOperation {
     */
    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/";

@@ -144,7 +149,7 @@ public class RemoteGetUserQuotaOperation extends RemoteOperation {
                    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