mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Fail to start server if detected cross-device mounts. (#4807)
Fixes #4764
This commit is contained in:
committed by
Dee Koder
parent
3d21119ec8
commit
879cef37a1
@@ -17,6 +17,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
pathutil "path"
|
||||
@@ -360,6 +361,9 @@ func fsRenameFile(sourcePath, destPath string) error {
|
||||
return traceError(err)
|
||||
}
|
||||
if err := os.Rename((sourcePath), (destPath)); err != nil {
|
||||
if isSysErrCrossDevice(err) {
|
||||
return traceError(fmt.Errorf("%s (%s)->(%s)", errCrossDeviceLink, sourcePath, destPath))
|
||||
}
|
||||
return traceError(err)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user