xiongzhu 4 éve
szülő
commit
11c2a6f8ac
1 módosított fájl, 6 hozzáadás és 7 törlés
  1. 6 7
      gulpfile.js

+ 6 - 7
gulpfile.js

@@ -1505,17 +1505,16 @@ if (os.platform().indexOf("win") == -1) {
 }
 
 function make_def_config(cb) {
+    if (
+        !fs.existsSync(path.resolve(__dirname, "target", "o2server", "config"))
+    ) {
+        fs.mkdirSync(path.resolve(__dirname, "target", "o2server", "config"));
+    }
     fs.readdirSync(path.resolve(__dirname, "config")).forEach((child) => {
         if (/.+\.json/.test(child)) {
             fs.copyFileSync(
                 path.resolve(__dirname, "config", child),
-                path.resolve(
-                    __dirname,
-                    "target",
-                    "o2server",
-                    "config",
-                    child
-                )
+                path.resolve(__dirname, "target", "o2server", "config", child)
             );
         }
     });