...
This commit is contained in:
1 parent
d18ffaafc6
commit
e0febdfa07
1 file changed
+1
-1
+1
-1
@@ -15,7 +15,7 @@ function deletePath(targetPath) {
|
|||||||
|
|
||||||
if (stats.isFile()) {
|
if (stats.isFile()) {
|
||||||
// 如果是文件,直接删除
|
// 如果是文件,直接删除
|
||||||
fs.unlink(targetPath, (err) => {
|
fs.rm(targetPath, { recursive: true }, (err) => {
|
||||||
if (err) return reject(err);
|
if (err) return reject(err);
|
||||||
resolve(); // 删除成功
|
resolve(); // 删除成功
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user