π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: migrate db on mac
Prateek Sunalab4fae7922d8
diff --git a/auth/lib/main.dart b/auth/lib/main.dartindex aa1ec2630b..c2e52ce8c1 100644--- a/auth/lib/main.dart+++ b/auth/lib/main.dart@@ -77,7 +77,7 @@ void main() async {size: WindowListenerService.instance.getWindowSize(),);await windowManager.waitUntilReadyToShow(windowOptions, () async {- if (Platform.isWindows || Platform.isLinux) {+ if (PlatformUtil.isDesktop()) {await DirectoryUtils.migrateNamingChanges();}await windowManager.show();diff --git a/auth/lib/utils/directory_utils.dart b/auth/lib/utils/directory_utils.dartindex 169f5d2876..b06807e5e4 100644--- a/auth/lib/utils/directory_utils.dart+++ b/auth/lib/utils/directory_utils.dart@@ -66,17 +66,33 @@ class DirectoryUtils {Directory oldDataDir;Directory newDataDir;+ Directory? tempDir;if (Platform.isLinux) {oldDataDir = Directory(p.join(dataHome.path, "ente_auth"),);- } else {+ tempDir = Directory(+ p.join(dataHome.path, "enteauth"),+ );+ } else if (Platform.isWindows) {oldDataDir = Directory(p.join((await getApplicationDocumentsDirectory()).path,"ente",),);+ tempDir = Directory(+ p.join(+ (await getApplicationDocumentsDirectory()).path,+ "enteauth",+ ),+ );+ } else {+ oldDataDir = await getApplicationDocumentsDirectory();+ }++ if (tempDir?.existsSync() ?? false) {+ oldDataDir = tempDir!;}newDataDir = await getApplicationSupportDirectory();await newDataDir.create(recursive: true);