deal with flutter SYSTEM user

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-09-28 10:55:19 +08:00
parent 728985e3bf
commit ae8d97eb72

View File

@ -106,7 +106,12 @@ class PlatformFFI {
debugPrint('initializing FFI $_appType'); debugPrint('initializing FFI $_appType');
try { try {
_translate = dylib.lookupFunction<F2, F2>('translate'); _translate = dylib.lookupFunction<F2, F2>('translate');
_dir = (await getApplicationDocumentsDirectory()).path; try {
// SYSTEM user failed
_dir = (await getApplicationDocumentsDirectory()).path;
} catch (e) {
debugPrint('Failed to get documents directory: $e');
}
_ffiBind = RustdeskImpl(dylib); _ffiBind = RustdeskImpl(dylib);
_startListenEvent(_ffiBind); // global event _startListenEvent(_ffiBind); // global event
try { try {