Skip to content

Commit

Permalink
Fixed: CopyFile not working (stashapp#4104)
Browse files Browse the repository at this point in the history
  • Loading branch information
its-josh4 authored Sep 11, 2023
1 parent da38ec0 commit b36aa74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fsutil/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func CopyFile(srcpath, dstpath string) (err error) {
return err
}

w, err := os.OpenFile(dstpath, os.O_CREATE|os.O_EXCL, 0666)
w, err := os.OpenFile(dstpath, os.O_CREATE|os.O_WRONLY|os.O_EXCL, 0666)
if err != nil {
r.Close() // We need to close the input file as the defer below would not be called.
return err
Expand Down

0 comments on commit b36aa74

Please sign in to comment.