Added logging to accesible folder, and made all questions page more readable

This commit is contained in:
YourFriendlyNeighborhoodDealer 2019-02-27 18:58:29 +01:00
parent ccc7f31e3a
commit 59640eaddf
16 changed files with 149 additions and 15 deletions

6
utils.js Executable file → Normal file
View 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];
}