Browse Source

Fix query quota (#7237)

rinfo: added support for --iec

also: added a missing \n to the generated output
Franco Ayala 2 năm trước cách đây
mục cha
commit
cd68f71d07
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/borg/archiver/rinfo_cmd.py

+ 3 - 3
src/borg/archiver/rinfo_cmd.py

@@ -52,11 +52,11 @@ class RInfoMixIn:
 
             response = repository.info()
             storage_quota = response["storage_quota"]
-            used = format_file_size(response["storage_quota_use"])
+            used = format_file_size(response["storage_quota_use"], iec=args.iec)
 
-            output += f"Storage quota: {used} used"
+            output += f"\nStorage quota: {used} used"
             if storage_quota:
-                output += f" out of {format_file_size(storage_quota)}"
+                output += f" out of {format_file_size(storage_quota, iec=args.iec)}"
             output += "\n"
 
             output += (