From d49b8f614132d40839ec500fcae10f37dcebe1d7 Mon Sep 17 00:00:00 2001 From: Wiktor Sieprawski Date: Thu, 23 Nov 2023 16:43:06 +0100 Subject: [PATCH] chore: change data directories #2094 (#2099) --- packages/desktop/src/shared/static.ts | 2 +- .../java/com/quietmobile/Communication/CommunicationModule.java | 2 +- .../android/app/src/main/java/com/quietmobile/Utils/Utils.kt | 2 +- packages/mobile/ios/DataDirectory.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/desktop/src/shared/static.ts b/packages/desktop/src/shared/static.ts index 007634973e..b0a95acfd7 100644 --- a/packages/desktop/src/shared/static.ts +++ b/packages/desktop/src/shared/static.ts @@ -1,7 +1,7 @@ import mirrorKey from 'keymirror' export const DEV_DATA_DIR = 'Quietdev' -export const DATA_DIR = 'Quiet' +export const DATA_DIR = 'Quiet2' export const actionTypes = mirrorKey({ SET_APP_VERSION: undefined, diff --git a/packages/mobile/android/app/src/main/java/com/quietmobile/Communication/CommunicationModule.java b/packages/mobile/android/app/src/main/java/com/quietmobile/Communication/CommunicationModule.java index d4798c6222..e51ee1f125 100644 --- a/packages/mobile/android/app/src/main/java/com/quietmobile/Communication/CommunicationModule.java +++ b/packages/mobile/android/app/src/main/java/com/quietmobile/Communication/CommunicationModule.java @@ -92,7 +92,7 @@ private static void sendEvent(@Nullable WritableMap params) { private static void deleteBackendData() { Context context = reactContext.getApplicationContext(); try { - FileUtils.deleteDirectory(new File(context.getFilesDir(), "backend/files")); + FileUtils.deleteDirectory(new File(context.getFilesDir(), "backend/files2")); } catch (IOException e) { e.printStackTrace(); } diff --git a/packages/mobile/android/app/src/main/java/com/quietmobile/Utils/Utils.kt b/packages/mobile/android/app/src/main/java/com/quietmobile/Utils/Utils.kt index 123288a0d6..29491191a0 100644 --- a/packages/mobile/android/app/src/main/java/com/quietmobile/Utils/Utils.kt +++ b/packages/mobile/android/app/src/main/java/com/quietmobile/Utils/Utils.kt @@ -24,7 +24,7 @@ object Utils { } fun createDirectory(context: Context): String { - val dataDirectory = File(context.filesDir, "backend/files") + val dataDirectory = File(context.filesDir, "backend/files2") dataDirectory.mkdirs() return dataDirectory.absolutePath diff --git a/packages/mobile/ios/DataDirectory.swift b/packages/mobile/ios/DataDirectory.swift index e03faf33ec..5afc8b73c6 100644 --- a/packages/mobile/ios/DataDirectory.swift +++ b/packages/mobile/ios/DataDirectory.swift @@ -6,7 +6,7 @@ class DataDirectory: NSObject { let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) let documentsDirectory = paths[0] let docURL = URL(string: documentsDirectory)! - let dataPath = docURL.appendingPathComponent("backend/files") + let dataPath = docURL.appendingPathComponent("backend/files2") if !FileManager.default.fileExists(atPath: dataPath.path) { do { try FileManager.default.createDirectory(atPath: dataPath.path, withIntermediateDirectories: true, attributes: nil)