File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,12 @@ impl AppStatics {
41
41
let path_resolver = app. handle ( ) . path ( ) ;
42
42
let app_data_dir = path_resolver. app_data_dir ( ) . unwrap ( ) ;
43
43
44
- let resource_dir = if cfg ! ( target_os = "linux" ) {
45
- // HACK: tauri's path resolver doesn't work correctly on linux standalone builds.
46
- // it reports /usr/lib/OpenFusionLauncher for the resource directory,
47
- // but the resources are actually in the same directory as the executable.
48
- std:: env:: current_exe ( ) . unwrap ( ) . parent ( ) . unwrap ( ) . into ( )
49
- } else {
50
- path_resolver. resource_dir ( ) . unwrap ( )
51
- } ;
44
+ let mut resource_dir = path_resolver. resource_dir ( ) . unwrap ( ) ;
45
+ if !std:: fs:: exists ( resource_dir. join ( "ffrunner.exe" ) ) . unwrap_or ( false ) {
46
+ // Resource directory is incorrect. Assume standalone build
47
+ // and use the current executable's directory as the resource dir.
48
+ resource_dir = std:: env:: current_exe ( ) . unwrap ( ) . parent ( ) . unwrap ( ) . into ( ) ;
49
+ }
52
50
53
51
let ff_cache_dir = path_resolver
54
52
. resolve ( "ffcache" , BaseDirectory :: AppCache )
You can’t perform that action at this time.
0 commit comments