Confine local file installation paths
This commit is contained in:
@@ -21,6 +21,13 @@ func PromoteDirectory(src, dst string) error {
|
||||
if err := checkAtomicDirectoryPromotionSupport(); err != nil {
|
||||
return err
|
||||
}
|
||||
parent, _, err := openConfinedParent(dst, false, 0)
|
||||
if err != nil {
|
||||
return fmt.Errorf("open destination parent: %w", err)
|
||||
}
|
||||
if err := parent.Close(); err != nil {
|
||||
return fmt.Errorf("close destination parent: %w", err)
|
||||
}
|
||||
return promoteDirectory(src, dst, renameDirectoryNoReplace)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user