Confine local file installation paths
This commit is contained in:
@@ -16,7 +16,11 @@ func syncDirectory(path string) error {
|
||||
}
|
||||
defer func() { _ = directory.Close() }()
|
||||
|
||||
err = directory.Sync()
|
||||
return syncDirectoryFile(directory, path)
|
||||
}
|
||||
|
||||
func syncDirectoryFile(directory *os.File, path string) error {
|
||||
err := directory.Sync()
|
||||
// Some Unix filesystems do not implement directory syncing. Report this
|
||||
// explicitly so callers do not confuse visible replacement with a durable one.
|
||||
if errors.Is(err, syscall.EINVAL) || errors.Is(err, syscall.ENOTSUP) {
|
||||
|
||||
Reference in New Issue
Block a user