WIP: proper home directory location for linux

This commit is contained in:
julian 2022-11-09 17:54:12 -06:00
parent 3ee0e97628
commit 8b7e222d41

View file

@ -85,10 +85,20 @@ void main() async {
if (Platform.isIOS) { if (Platform.isIOS) {
appDirectory = (await getLibraryDirectory()); appDirectory = (await getLibraryDirectory());
} }
if (Platform.isLinux || Logging.isArmLinux) {
if (Logging.isArmLinux) {
appDirectory = Directory("${appDirectory.path}/.stackwallet"); appDirectory = Directory("${appDirectory.path}/.stackwallet");
await appDirectory.create(); await appDirectory.create();
} }
if (Platform.isLinux) {
appDirectory = Directory("${Platform.environment['HOME']}/.stackwallet");
if (!appDirectory.existsSync()) {
await appDirectory.create();
}
}
// FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); // FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
if (!(Logging.isArmLinux || Logging.isTestEnv)) { if (!(Logging.isArmLinux || Logging.isTestEnv)) {
final isar = await Isar.open( final isar = await Isar.open(