mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
fix(rest) rmDir -> rmdir
This commit is contained in:
parent
13cab39c4f
commit
f05038d55e
1 changed files with 5 additions and 3 deletions
|
|
@ -48,9 +48,11 @@
|
|||
});
|
||||
},
|
||||
delete : rimraf || function(path, callback) {
|
||||
dir.isDir(path, function(isDir) {
|
||||
if (isDir)
|
||||
fs.rmDir(path, callback);
|
||||
dir.isDir(path, function(error, isDir) {
|
||||
if (error)
|
||||
callback(error);
|
||||
else if (isDir)
|
||||
fs.rmdir(path, callback);
|
||||
else
|
||||
fs.unlink(path, callback);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue