Comparing version 1.2.3 to 1.2.4
{ | ||
"name": "depsync", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"author": "Dom Chen", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.idom.me/", |
@@ -61,18 +61,2 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
function deleteDirectory(path) { | ||
let files = []; | ||
if (fs.existsSync(path)) { | ||
files = fs.readdirSync(path); | ||
files.forEach(function (file) { | ||
let curPath = path + "/" + file; | ||
if (fs.statSync(curPath).isDirectory()) { | ||
deleteDirectory(curPath); | ||
} else { | ||
fs.unlinkSync(curPath); | ||
} | ||
}); | ||
fs.rmdirSync(path); | ||
} | ||
} | ||
function deleteEmptyDir(path) { | ||
@@ -93,7 +77,3 @@ try { | ||
try { | ||
if (fs.lstatSync(path).isDirectory()) { | ||
deleteDirectory(path); | ||
} else { | ||
fs.unlinkSync(path); | ||
} | ||
fs.rmSync(path, { recursive: true, force: true }); | ||
} catch (e) { | ||
@@ -100,0 +80,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45878
1072