lrf 2 gadi atpakaļ
vecāks
revīzija
e0625ae01c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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);