Fix export trash movement
This commit is contained in:
parent
f91dddda93
commit
f2a764aac2
1 changed files with 4 additions and 2 deletions
|
@ -1398,17 +1398,19 @@ const moveToTrash = async (
|
|||
|
||||
if (await fs.exists(filePath)) {
|
||||
await fs.mkdirIfNeeded(trashDir);
|
||||
const trashFilePath = await safeFileName(trashDir, fileName, fs.exists);
|
||||
const trashFileName = await safeFileName(trashDir, fileName, fs.exists);
|
||||
const trashFilePath = `${trashDir}/${trashFileName}`;
|
||||
await fs.rename(filePath, trashFilePath);
|
||||
}
|
||||
|
||||
if (await fs.exists(metadataFilePath)) {
|
||||
await fs.mkdirIfNeeded(metadataTrashDir);
|
||||
const metadataTrashFilePath = await safeFileName(
|
||||
const metadataTrashFileName = await safeFileName(
|
||||
metadataTrashDir,
|
||||
metadataFileName,
|
||||
fs.exists,
|
||||
);
|
||||
const metadataTrashFilePath = `${metadataTrashDir}/${metadataTrashFileName}`;
|
||||
await fs.rename(metadataFilePath, metadataTrashFilePath);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue