From ce0f7c03784f1012afbbbf41569bd23f248eefee Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 22 Jan 2025 08:36:03 -0500 Subject: [PATCH] Use commas in file size in over-quota error --- chrome/content/zotero/xpcom/storage/zfs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js index f8481b0e0c..9ab81fc369 100644 --- a/chrome/content/zotero/xpcom/storage/zfs.js +++ b/chrome/content/zotero/xpcom/storage/zfs.js @@ -1076,7 +1076,9 @@ Zotero.Sync.Storage.Mode.ZFS.prototype = { var filename = item.attachmentFilename; var fileSize = (await OS.File.stat(item.getFilePath())).size; - text += "\n\n" + filename + " (" + Math.round(fileSize / 1024) + " KB)"; + text += "\n\n" + filename + // TODO: Format more intelligently (e.g., use MB or GB for large files) + + " (" + Zotero.Utilities.numberFormat(Math.round(fileSize / 1024), 0) + " KB)"; var e = new Zotero.Error( text,