File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -817,11 +817,21 @@ impl Instance {
817817
818818 // Filter anonymous_volumes to exclude paths that conflict with extra_volumes
819819 // (extra_volumes should take precedence over volume_ignores)
820+ // Conflicts include:
821+ // - Exact match: both point to same path
822+ // - Anonymous volume is parent of extra_volume (would shadow the mount)
823+ // - Anonymous volume is inside extra_volume (redundant/conflicting)
820824 let anonymous_volumes: Vec < String > = sandbox_config
821825 . volume_ignores
822826 . iter ( )
823827 . map ( |ignore| format ! ( "{}/{}" , workspace_path, ignore) )
824- . filter ( |path| !extra_volume_container_paths. contains ( path) )
828+ . filter ( |anon_path| {
829+ !extra_volume_container_paths. iter ( ) . any ( |extra_path| {
830+ anon_path == extra_path
831+ || extra_path. starts_with ( & format ! ( "{}/" , anon_path) )
832+ || anon_path. starts_with ( & format ! ( "{}/" , extra_path) )
833+ } )
834+ } )
825835 . collect ( ) ;
826836
827837 Ok ( ContainerConfig {
You can’t perform that action at this time.
0 commit comments