Skip to content

Commit

Permalink
chore: change data directories #2094 (#2099)
Browse files Browse the repository at this point in the history
  • Loading branch information
siepra authored Nov 23, 2023
1 parent 16612aa commit d49b8f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/desktop/src/shared/static.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/ios/DataDirectory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d49b8f6

Please sign in to comment.