Merge pull request 'fix' (#39) from dev into main

Reviewed-on: #39
This commit is contained in:
fanxb 2022-12-17 18:55:57 +08:00
commit 5251b5f0b5

View File

@ -27,6 +27,9 @@ class RenamerService {
let old = fileList[i]; let old = fileList[i];
let oldPath = path.join(fileList[i].path, fileList[i].name); let oldPath = path.join(fileList[i].path, fileList[i].name);
let newPath = path.join(changedFileList[i].path, changedFileList[i].name); let newPath = path.join(changedFileList[i].path, changedFileList[i].name);
if (oldPath === newPath) {
continue;
}
if ((await fs.pathExists(newPath))) { if ((await fs.pathExists(newPath))) {
throw new Error("此路径已存在:" + newPath); throw new Error("此路径已存在:" + newPath);
} }