Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change data directories #2094 #2099

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -23,7 +23,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
Loading