mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 05:09:09 +08:00
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
This commit is contained in:
parent
c9bb3ff6f6
commit
9b1e9552d6
@ -40,7 +40,7 @@ async function checkAppDataDiskQuota(appDataPath: string) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const { free } = diskInfo
|
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
|
// if free is less than 1GB, return true
|
||||||
return free < 1 * GB
|
return free < 1 * GB
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user