file-system
Advanced tools
Comparing version 1.2.0 to 1.2.1
10
index.js
@@ -312,3 +312,3 @@ /** | ||
* @description | ||
* Remove file or all files in folder | ||
* Remove folder and files in folder, but it's synchronous | ||
* @example | ||
@@ -337,2 +337,4 @@ * file.rmdirSync('path'); | ||
/** | ||
@@ -370,5 +372,7 @@ * @description | ||
while(length--) { | ||
var isSubdir = new RegExp('^' + item); | ||
var newItem = folders[length]; | ||
var isSubdir = newItem.indexOf(item) === 0; | ||
var notSamelevel = newItem.split(path.sep).length != item.split(path.sep).length; | ||
if (folders[length] != item && isSubdir.test(folders[length])) { | ||
if (isSubdir && notSamelevel) { | ||
return false; | ||
@@ -375,0 +379,0 @@ } |
{ | ||
"name": "file-system", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Strengthen the ability of file system", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
25032
777