Skip to content

Commit e352c4f

Browse files
committed
Avoid clone copy
1 parent 8be31a9 commit e352c4f

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

dkv/storage/local_filesystem.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ func (fs *LocalFilesystem) Copy(sourceURI string, destination string) error {
7676
panic(err)
7777
}
7878

79-
// Then do a clone copy
80-
cmd := exec.Command("cp", "-c", sourceURI, destinationPath)
79+
cmd := exec.Command("cp", sourceURI, destinationPath)
8180
if out, err := cmd.CombinedOutput(); err != nil {
8281
return fmt.Errorf("cp command %s: %w", out, err)
8382
}

storage/localfs/localfs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ func (d *Directory) Copy(sourceURI string, destination string) error {
151151
panic(err)
152152
}
153153

154-
// Then do a clone copy
155-
cmd := exec.Command("cp", "-c", sourceURI, destinationPath)
154+
// Then do a copy
155+
cmd := exec.Command("cp", sourceURI, destinationPath)
156156
if out, err := cmd.CombinedOutput(); err != nil {
157157
return fmt.Errorf("cp command %s: %w", out, err)
158158
}

0 commit comments

Comments
 (0)