-
-
Notifications
You must be signed in to change notification settings - Fork 395
fix: check winboat disk space instead of its parent path #418
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -943,8 +943,22 @@ const installFolderErrors = computedAsync(async () => { | |
| errors.push("The selected install location is not writable"); | ||
| } | ||
|
|
||
| // Create /winboat | ||
| const winboatPath = path.join(parentPath, "winboat"); | ||
| const isWinboatPathCreated = false; | ||
| try { | ||
| fs.mkdirSync(winboatPath, { recursive: true }); | ||
| isWinboatPathCreated = true; | ||
| console.log("Created winboat directory at", winboatPath); | ||
| } catch (err) { | ||
| console.error(err); | ||
| } | ||
|
|
||
| // Check if we have enough disk space | ||
| const diskSpace = await checkDiskSpace(parentPath); | ||
| const diskSpace = await checkDiskSpace(isWinboatPathCreated ? winboatPath : parentPath); | ||
| if (isWinboatPathCreated) { | ||
| await fs.rm(winboatPath, { recursive: true }); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Error: Object literal may only specify known properties, and 'recursive' does not exist in type 'NoParamCallback`
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting; where are you seeing this error? I had a lot of trouble seeing any errors. I had to rely solely on if things worked or not. |
||
| } | ||
| const freeGB = Math.floor(diskSpace.free / (1024 * 1024 * 1024)); | ||
| if (freeGB < MIN_DISK_GB) { | ||
| errors.push( | ||
|
|
||
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.
how does this work when isWinboatPathCreated is a constant?
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.
Whoops. That bool was a last-minute thing so it went untested