commit
5251b5f0b5
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user