Skip to content

Commit

Permalink
Fixed folders are not creating
Browse files Browse the repository at this point in the history
  • Loading branch information
Terria-K committed Sep 1, 2023
1 parent 32f0e74 commit be2e7fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyrgos-gui/src/state/appState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function load() {
const resolved = await resolve(path, "saves", "saveData.json");
const exists = await fs.exists("saves", { dir: BaseDirectory.AppData });
if (!exists)
await fs.createDir("saves", { dir: BaseDirectory.AppData });
await fs.createDir("saves", { dir: BaseDirectory.AppData, recursive: true });
const appState: AppState = await loadClient(resolved);
return appState;
}
2 changes: 1 addition & 1 deletion pyrgos-gui/src/state/tagResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type Tag = {
export async function fetchDownloaded() {
const folderExists = await fs.exists("installer", { dir: BaseDirectory.AppData });
if (!folderExists)
await fs.createDir("installer", { dir: BaseDirectory.AppData });
await fs.createDir("installer", { dir: BaseDirectory.AppData, recursive: true });

const dirs: fs.FileEntry[] = await fs.readDir("installer", { dir: BaseDirectory.AppData });
dirs.forEach(async x => {
Expand Down

0 comments on commit be2e7fc

Please sign in to comment.