aboutsummaryrefslogtreecommitdiff
path: root/src/files.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/files.ts')
-rw-r--r--src/files.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/files.ts b/src/files.ts
index b5495d8..a0bed00 100644
--- a/src/files.ts
+++ b/src/files.ts
@@ -349,16 +349,20 @@ export const rootPathFile: File | null = null;
export const createRootFolder: () => Promise<void> = async(
): Promise<void> => {
- if (!(await fs.access(CONTENT_BASE_DIRECTORY))) {
+ try {
await fs.mkdir(CONTENT_BASE_DIRECTORY);
+ } catch (e) {
+ logger.warn(`error when creating base folder: ${e}`);
}
};
export const createProjectFolder: (name: string) => Promise<void> = async(
projName: string
): Promise<void> => {
- if (!(await fs.access(CONTENT_BASE_DIRECTORY + '/' + projName))) {
+ try {
await fs.mkdir(CONTENT_BASE_DIRECTORY + '/' + projName);
+ } catch (e) {
+ logger.warn(`error when creating folder for project ${projName}: ${e}`);
}
};