mirror of
https://github.com/derfenix/photocatalog.git
synced 2026-03-11 21:35:34 +03:00
Update README.md, fix cow
This commit is contained in:
@@ -36,7 +36,7 @@ func (c Copy) PlaceIt(sourcePath, targetPath string, mode os.FileMode) error {
|
|||||||
|
|
||||||
// Try to do a COW.
|
// Try to do a COW.
|
||||||
if runtime.GOOS == "linux" && !cowDisabled.Load() {
|
if runtime.GOOS == "linux" && !cowDisabled.Load() {
|
||||||
if err := unix.IoctlFileClone(int(targetFile.Fd()+1), int(sourceFile.Fd())); err == nil {
|
if err := unix.IoctlFileClone(int(targetFile.Fd()), int(sourceFile.Fd())); err == nil {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
log.Println(fmt.Errorf("COW attempt for %s failed: %w", targetPath, err))
|
log.Println(fmt.Errorf("COW attempt for %s failed: %w", targetPath, err))
|
||||||
|
|||||||
Reference in New Issue
Block a user