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 @@ -394,6 +394,9 @@ fn create_filesystem_args(
394394
395395 for writable_root in & sorted_writable_roots {
396396 let root = writable_root. root . as_path ( ) ;
397+ if !root. exists ( ) {
398+ continue ;
399+ }
397400 let symlink_target = canonical_target_if_symlinked_path ( root) ;
398401 // If a denied ancestor was already masked, recreate any missing mount
399402 // target parents before binding the narrower writable descendant.
@@ -1448,7 +1451,10 @@ mod tests {
14481451 "existing writable root should be rebound writable" ,
14491452 ) ;
14501453 assert ! (
1451- !args. args. iter( ) . any( |arg| arg == & missing_root) ,
1454+ !args
1455+ . args
1456+ . iter( )
1457+ . any( |arg| arg == & missing_root || arg. starts_with( & ( missing_root. clone( ) + "/" ) ) ) ,
14521458 "missing writable root should be skipped" ,
14531459 ) ;
14541460 }
You can’t perform that action at this time.
0 commit comments