mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added logging to accesible folder, and made all questions page more readable
This commit is contained in:
6
utils.js
Executable file → Normal file
6
utils.js
Executable file → Normal file
@@ -36,8 +36,10 @@ function CreatePath(path, onlyPath) {
|
||||
var p = path.split("/");
|
||||
var currDir = p[0];
|
||||
for (var i = 1; i < p.length; i++) {
|
||||
if (!fs.existsSync(currDir)) {
|
||||
fs.mkdirSync(currDir);
|
||||
if (currDir != "" && !fs.existsSync(currDir)) {
|
||||
try {
|
||||
fs.mkdirSync(currDir);
|
||||
} catch (e) { console.log("Failed to make " + currDir + " directory... "); }
|
||||
}
|
||||
currDir += "/" + p[i];
|
||||
}
|
||||
|
Reference in New Issue
Block a user