lrf 2 years ago
parent
commit
e0625ae01c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/service/disk.js

+ 1 - 1
app/service/disk.js

@@ -58,7 +58,7 @@ class DiskService extends CrudService {
   async dirDelete(filePath, times) {
     if (fs.existsSync(filePath)) {
       const files = fs.readdirSync(filePath);
-      if (files.length > 0 && !times) throw new BusinessError(ErrorCode.SERVICE_FAULT, '内部有文件/目录,请先清空该目录');
+      if (files.length > 0 && !times) throw new BusinessError(ErrorCode.SERVICE_FAULT, '该目录有文件');
 
       for (const file of files) {
         const curPath = path.resolve(filePath, file);