aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/packages.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/packages.js b/src/modules/packages.js
index 8a5af76..c9fb1c4 100644
--- a/src/modules/packages.js
+++ b/src/modules/packages.js
@@ -23,8 +23,12 @@ function update_path() {
} else {return}
}
- // create the folder, in case it doesn't already exist
- fs.mkdirSync(packages.path);
+ // only create folder if the profile folder exists
+ if (fs.existsSync(path.dirname(packages.path))) {
+ // create the folder, in case it doesn't already exist
+ fs.mkdirSync(packages.path);
+ }
+
}; update_path();
packages.format_name = (author, package_name, version) => {