Selaa lähdekoodia

修改删除逻辑

lrf 2 vuotta sitten
vanhempi
commit
9c37734583
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      app/service/disk.js

+ 2 - 1
app/service/disk.js

@@ -62,8 +62,9 @@ class DiskService extends CrudService {
         const curPath = path.resolve(filePath, file);
         const fi = fs.statSync(curPath);
         if (fi.isDirectory()) {
+          throw new BusinessError(ErrorCode.SERVICE_FAULT, '内部有文件/目录,请先清空该目录');
           // recurse
-          this.dirDelete(curPath);
+          // this.dirDelete(curPath);
         } else {
           // delete file
           if (_.get(times, 'start_time') && _.get(times, 'end_time')) {