mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
use syscall.Rename() directly instead of os.Rename() (#17982)
This commit is contained in:
@@ -20,10 +20,18 @@
|
||||
|
||||
package cmd
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Rename2 is not implemented in a non linux environment
|
||||
func Rename2(src, dst string) (err error) {
|
||||
defer updateOSMetrics(osMetricRename2, src, dst)(errors.New("not implemented, skipping"))
|
||||
return errSkipFile
|
||||
}
|
||||
|
||||
// RenameSys is low level call in case of non-Linux this just uses os.Rename()
|
||||
func RenameSys(src, dst string) (err error) {
|
||||
return os.Rename(src, dst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user