From 9b1e9552d62d6f2b655bfa9a590ddb7f12d3fbc4 Mon Sep 17 00:00:00 2001 From: Phantom <59059173+EurFelux@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:14:15 +0800 Subject: [PATCH] fix: correct disk quota display by converting bytes to GB (#10160) * fix: correct disk quota display by converting bytes to GB The free disk space was being logged in bytes instead of GB, making the log message misleading. Convert the value to GB for accurate reporting. * fix: format disk quota log to 2 decimal places --- src/renderer/src/utils/dataLimit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/utils/dataLimit.ts b/src/renderer/src/utils/dataLimit.ts index 9cbc378a53..7678099be2 100644 --- a/src/renderer/src/utils/dataLimit.ts +++ b/src/renderer/src/utils/dataLimit.ts @@ -40,7 +40,7 @@ async function checkAppDataDiskQuota(appDataPath: string) { return false } const { free } = diskInfo - logger.info(`App data disk quota: Free ${free} GB`) + logger.info(`App data disk quota: Free ${(free / GB).toFixed(2)} GB`) // if free is less than 1GB, return true return free < 1 * GB } catch (error) {