소스 검색

Fix export trash movement

Manav Rathi 1 년 전
부모
커밋
f2a764aac2
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      web/apps/photos/src/services/export/index.ts

+ 4 - 2
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);
     }
 };