mirror of https://github.com/stashapp/stash.git
Fixed: CopyFile not working (#4104)
This commit is contained in:
parent
da38ec03c0
commit
b36aa745d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue