diff --git a/src/renderer/components/workAdd/files/calc.js b/src/renderer/components/workAdd/files/calc.js index 54ff7a6..41f7e66 100644 --- a/src/renderer/components/workAdd/files/calc.js +++ b/src/renderer/components/workAdd/files/calc.js @@ -46,7 +46,7 @@ export function getExtension(name) { export function bytesToSize(bytes) { if (bytes === 0) return "0 B"; - var k = 1024, + var k = process.platform === 'linux' ? 1000 : 1024, sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], i = Math.floor(Math.log(bytes) / Math.log(k)); return (bytes / Math.pow(k, i)).toPrecision(3) + " " + sizes[i];