Enable cross-device rename and rebuild the Cells binary.
Edit the file /home/pydio/cells/minio/cmd/os-reliable.go
Go to line 21, locate
import (
"fmt"
"os"
"path"
)
Replace it with
import (
"fmt"
"os"
"io"
"path"
)
Go to line 146, locate
case isSysErrCrossDevice(err):
return fmt.Errorf("%w (%s)->(%s)", errCrossDeviceLink, srcFilePath, dstFilePath)
Replace it with
case isSysErrCrossDevice(err):
if err = MoveFile(srcFilePath, dstFilePath); err != nil {
fmt.Println(err.Error())
return fmt.Errorf("%w (%s)->(%s)", errCrossDeviceLink, srcFilePath, dstFilePath)
}
At the end of the file, create this new function
func MoveFile(sourcePath, destPath string) error {
inputFile, err := os.Open(sourcePath)
if err != nil {
return fmt.Errorf("Couldn't open source file: %s", err)
}
outputFile, err := os.Create(destPath)
if err != nil {
inputFile.Close()
return fmt.Errorf("Couldn't open dest file: %s", err)
}
defer outputFile.Close()
_, err = io.Copy(outputFile, inputFile)
inputFile.Close()
if err != nil {
return fmt.Errorf("Writing to output file failed: %s", err)
}
// The copy was successful, so now delete the original file
err = os.Remove(sourcePath)
if err != nil {
return fmt.Errorf("Failed removing original file: %s", err)
}
return nil
}
Run make again