mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
pkg/safe: remove temporary file on failure (#1774)
This commit is contained in:
2
posix.go
2
posix.go
@@ -358,7 +358,7 @@ func (s fsStorage) CreateFile(volume, path string) (writeCloser io.WriteCloser,
|
||||
return nil, errIsNotRegular
|
||||
}
|
||||
}
|
||||
w, err := safe.CreateFileWithPrefix(filePath, "$tmpfile")
|
||||
w, err := safe.CreateFile(filePath)
|
||||
if err != nil {
|
||||
// File path cannot be verified since one of the parents is a file.
|
||||
if strings.Contains(err.Error(), "not a directory") {
|
||||
|
||||
Reference in New Issue
Block a user