From 8b7e222d416ba2d38a1236a7a6b60b64efd21ffe Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 9 Nov 2022 17:54:12 -0600 Subject: [PATCH] WIP: proper home directory location for linux --- lib/main.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 7f7c4a44d..c88ae2164 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -85,10 +85,20 @@ void main() async { if (Platform.isIOS) { appDirectory = (await getLibraryDirectory()); } - if (Platform.isLinux || Logging.isArmLinux) { + + if (Logging.isArmLinux) { appDirectory = Directory("${appDirectory.path}/.stackwallet"); await appDirectory.create(); } + + if (Platform.isLinux) { + appDirectory = Directory("${Platform.environment['HOME']}/.stackwallet"); + + if (!appDirectory.existsSync()) { + await appDirectory.create(); + } + } + // FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); if (!(Logging.isArmLinux || Logging.isTestEnv)) { final isar = await Isar.open(