Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use also for the image

Manav Rathifca4b2aca6df
diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.ts
index c3cc6e7e7b..e35a78140d 100644
--- a/web/apps/photos/src/services/export/index.ts
+++ b/web/apps/photos/src/services/export/index.ts
@@ -755,41 +755,19 @@ class ExportService {
await this.removeFileExportedRecord(exportDir, fileUID);
try {
if (isLivePhotoExportName(fileExportName)) {
- const {
- image: imageExportName,
- video: videoExportName,
- } = parseLivePhotoExportName(fileExportName);
- const imageExportPath = `${collectionExportPath}/${imageExportName}`;
- log.info(
- `moving image file ${imageExportPath} to trash folder`,
- );
- if (await fs.exists(imageExportPath)) {
- await electron.moveFile(
- imageExportPath,
- await getTrashedFileExportPath(
- exportDir,
- imageExportPath,
- ),
- );
- }
+ const { image, video } =
+ parseLivePhotoExportName(fileExportName);
- const imageMetadataFileExportPath =
- getMetadataFileExportPath(imageExportPath);
-
- if (await fs.exists(imageMetadataFileExportPath)) {
- await electron.moveFile(
- imageMetadataFileExportPath,
- await getTrashedFileExportPath(
- exportDir,
- imageMetadataFileExportPath,
- ),
- );
- }
+ await moveToTrash(
+ exportDir,
+ collectionExportName,
+ image,
+ );
await moveToTrash(
exportDir,
collectionExportName,
- videoExportName,
+ video,
);
} else {
const fileExportPath = `${collectionExportPath}/${fileExportName}`;