File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,11 +80,13 @@ fn mount_fex_rootfs() -> Result<()> {
8080 // and a Config.json telling FEX to use FUSE. Neither should be visible to the guest. Instead,
8181 // we want to replace the folders and tell FEX to use our mounted rootfs
8282 for base in [ "/usr/share/fex-emu" , "/usr/local/share/fex-emu" ] {
83- let json = format ! ( "{{\" Config\" :{{\" RootFS\" :\" {dir_rootfs}\" }}}}\n " ) ;
84- let path = base. to_string ( ) + "/Config.json" ;
83+ if Path :: new ( base) . exists ( ) {
84+ let json = format ! ( "{{\" Config\" :{{\" RootFS\" :\" {dir_rootfs}\" }}}}\n " ) ;
85+ let path = base. to_string ( ) + "/Config.json" ;
8586
86- make_tmpfs ( base) ?;
87- File :: create ( Path :: new ( & path) ) ?. write_all ( json. as_bytes ( ) ) ?;
87+ make_tmpfs ( base) ?;
88+ File :: create ( Path :: new ( & path) ) ?. write_all ( json. as_bytes ( ) ) ?;
89+ }
8890 }
8991
9092 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments