mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Fixed: CopyFile not working (#4104)
This commit is contained in:
parent
da38ec03c0
commit
b36aa745d8
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ func CopyFile(srcpath, dstpath string) (err error) {
|
||||||
return err
|
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 {
|
if err != nil {
|
||||||
r.Close() // We need to close the input file as the defer below would not be called.
|
r.Close() // We need to close the input file as the defer below would not be called.
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue