|
@@ -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);
|