From aac101bad74afe79213b4820c784aa7222c54895 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Wed, 21 Dec 2016 14:40:43 +0100 Subject: [PATCH] prettify --- client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.js b/client.js index f5923a50..ea5c0bac 100644 --- a/client.js +++ b/client.js @@ -19,6 +19,7 @@ var deleteFolderRecursive = function (path) { fs.rmdirSync(path); } }; + function getDirectories(srcpath) { return fs.readdirSync(srcpath).filter(function (file) { return fs.statSync(path.join(srcpath, file)).isDirectory(); @@ -44,8 +45,8 @@ if (!command || command == "help" || command == "--help") { if (!process.argv[3]) { console.error("Usage: node client.js delete [instance]"); process.exit(1) - } else if (typeof process.argv[3] == "string" && fs.existsSync("./instances/"+process.argv[3]) && process.argv[3] != "/" && process.argv[3] != "") { - deleteFolderRecursive("./instances/"+process.argv[3]); + } else if (typeof process.argv[3] == "string" && fs.existsSync("./instances/" + process.argv[3]) && process.argv[3] != "/" && process.argv[3] != "") { + deleteFolderRecursive("./instances/" + process.argv[3]); console.log("Deleted instance " + process.argv[3]) process.exit(1) } else { @@ -190,7 +191,6 @@ function getID() { } }); }) - } setInterval(getID, 10000) // provide items --------------------------------------------------------------