Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/renderer/views/SetupUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Collaborator

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?

Copy link
Author

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

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 });
Copy link
Collaborator

Choose a reason for hiding this comment

The 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`

Copy link
Author

Choose a reason for hiding this comment

The 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(
Expand Down