π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline 1
Manav Rathica114a467dd1
diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.tsindex f2e90139a1..0d6d5ac32a 100644--- a/web/apps/photos/src/services/export/index.ts+++ b/web/apps/photos/src/services/export/index.ts@@ -27,7 +27,6 @@ import {import {convertCollectionIDExportNameObjectToMap,convertFileIDExportNameObjectToMap,- getCollectionExportPath,getCollectionExportedFiles,getCollectionIDFromFileUID,getDeletedExportedCollections,@@ -1219,3 +1218,8 @@ class ExportService {};}export default new ExportService();++const getCollectionExportPath = (+ exportFolder: string,+ collectionExportName: string,+) => `${exportFolder}/${collectionExportName}`;diff --git a/web/apps/photos/src/services/export/migration.ts b/web/apps/photos/src/services/export/migration.tsindex 69a6974027..812eafad4c 100644--- a/web/apps/photos/src/services/export/migration.ts+++ b/web/apps/photos/src/services/export/migration.ts@@ -22,7 +22,6 @@ import {import { EnteFile } from "types/file";import { getNonEmptyPersonalCollections } from "utils/collection";import {- getCollectionExportPath,getCollectionIDFromFileUID,getExportRecordFileUID,getLivePhotoExportName,@@ -433,7 +432,7 @@ async function removeCollectionExportMissingMetadataFolder(if (await exportService.exists(getMetadataFolderExportPath(- getCollectionExportPath(exportDir, collectionExportName),+ `${exportDir}/${collectionExportName}`,),)) {diff --git a/web/apps/photos/src/utils/collection/index.ts b/web/apps/photos/src/utils/collection/index.tsindex c188615157..3b0f955e09 100644--- a/web/apps/photos/src/utils/collection/index.ts+++ b/web/apps/photos/src/utils/collection/index.ts@@ -42,10 +42,7 @@ import {import { EnteFile } from "types/file";import { SetFilesDownloadProgressAttributes } from "types/gallery";import { SUB_TYPE, VISIBILITY_STATE } from "types/magicMetadata";-import {- getCollectionExportPath,- getUniqueCollectionExportName,-} from "utils/export";+import { getUniqueCollectionExportName } from "utils/export";import { downloadFilesWithProgress } from "utils/file";import { isArchivedCollection, updateMagicMetadata } from "utils/magicMetadata";@@ -176,10 +173,7 @@ async function createCollectionDownloadFolder(downloadDirPath,collectionName,);- const collectionDownloadPath = getCollectionExportPath(- downloadDirPath,- collectionDownloadName,- );+ const collectionDownloadPath = `${downloadDirPath}/${collectionDownloadName}`;await exportService.checkExistsAndCreateDir(collectionDownloadPath);return collectionDownloadPath;}diff --git a/web/apps/photos/src/utils/export/index.ts b/web/apps/photos/src/utils/export/index.tsindex 278b6cde31..bedd7cc59a 100644--- a/web/apps/photos/src/utils/export/index.ts+++ b/web/apps/photos/src/utils/export/index.ts@@ -200,9 +200,7 @@ export const getUniqueCollectionExportName = async (let collectionExportName = sanitizeName(collectionName);let count = 1;while (- (await exportService.exists(- getCollectionExportPath(dir, collectionExportName),- )) ||+ (await exportService.exists(`${dir}/${collectionExportName}`)) ||collectionExportName === ENTE_TRASH_FOLDER) {collectionExportName = `${sanitizeName(collectionName)}(${count})`;@@ -241,11 +239,6 @@ export const getFileMetadataExportPath = (fileExportName: string,) => `${collectionExportPath}/${ENTE_METADATA_FOLDER}/${fileExportName}.json`;-export const getCollectionExportPath = (- exportFolder: string,- collectionExportName: string,-) => `${exportFolder}/${collectionExportName}`;-export const getFileExportPath = (collectionExportPath: string,fileExportName: string,