From f2a764aac2ff897470df09c29e316af30bbc22aa Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 1 May 2024 13:42:09 +0530 Subject: [PATCH] Fix export trash movement --- web/apps/photos/src/services/export/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.ts index b387d4fd3c..c46e1d8fc7 100644 --- a/web/apps/photos/src/services/export/index.ts +++ b/web/apps/photos/src/services/export/index.ts @@ -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); } };