File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
codex-rs/linux-sandbox/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,9 @@ fn create_filesystem_args(
344344
345345 for writable_root in & sorted_writable_roots {
346346 let root = writable_root. root . as_path ( ) ;
347+ if !root. exists ( ) {
348+ continue ;
349+ }
347350 let symlink_target = canonical_target_if_symlinked_path ( root) ;
348351 // If a denied ancestor was already masked, recreate any missing mount
349352 // target parents before binding the narrower writable descendant.
@@ -1089,7 +1092,10 @@ mod tests {
10891092 "existing writable root should be rebound writable" ,
10901093 ) ;
10911094 assert ! (
1092- !args. args. iter( ) . any( |arg| arg == & missing_root) ,
1095+ !args
1096+ . args
1097+ . iter( )
1098+ . any( |arg| arg == & missing_root || arg. starts_with( & ( missing_root. clone( ) + "/" ) ) ) ,
10931099 "missing writable root should be skipped" ,
10941100 ) ;
10951101 }
You can’t perform that action at this time.
0 commit comments