Skip to content

Commit

Permalink
fix: Show storage full warning when storage is actually full
Browse files Browse the repository at this point in the history
< 0 values for "free" do not mean that the storage is full: https://github.com/nextcloud/server/blob/6befdd6dd7cd20fe7f7036e4665bcfbb783d6803/lib/public/Files/FileInfo.php#L31-L42

Signed-off-by: Louis Chemineau <louis@chmn.me>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

[skip ci]
  • Loading branch information
artonge authored and backportbot[bot] committed Sep 26, 2024
1 parent a4b5fc2 commit 3eae377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files/src/components/NavigationQuota.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
// specific to that situation anyhow. So this covers warning covers
// our primary day-to-day concern (individual account quota usage).
//
if (this.storageStats?.quota > 0 && this.storageStats?.free <= 0) {
if (this.storageStats?.quota > 0 && this.storageStats?.free === 0) {
this.showStorageFullWarning()
}
},
Expand Down Expand Up @@ -138,7 +138,7 @@ export default {

// Warn the user if the available account storage changed from > 0 to 0
// (unless only because quota was intentionally set to 0 by admin in the interim)
if (this.storageStats?.free > 0 && response.data.data?.free <= 0 && response.data.data?.quota > 0) {
if (this.storageStats?.free > 0 && response.data.data?.free === 0 && response.data.data?.quota > 0) {
this.showStorageFullWarning()
}

Expand Down

0 comments on commit 3eae377

Please sign in to comment.