-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI] Show if there is enough space available on Install #1336
Conversation
electron/main.ts
Outdated
const { free, size: diskSize } = await checkDiskSpace(folder) | ||
return `${getFileSize(free)}/${getFileSize(diskSize)}` | ||
ipcMain.handle('checkDiskSpace', async (event, folder: string) => { | ||
if (folder.startsWith('/')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering, does this work on windows? looks like unix specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, won't work. I will figure out another way of checking that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So actualy the function checkDiskSpace
checks if the path is valid based on the platform so we dont need to do it ourselves.
So I just changed it to a try catch now.
…uncher into fix_space_check
…uncher into fix_space_check
I fixed the error handler on the backend but the main check now is on the frontend.
I will check if there enough space and if the path is writable, if not, then the Install Button will be disabled.
Linux/Mac
Windows:
Use the following Checklist if you have changed something on the Backend or Frontend: