aboutsummaryrefslogtreecommitdiff
path: root/hotline/files.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-06 16:45:27 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-06 16:45:27 -0700
commit5c14e4c916d76ce35ee2b07bf832d5f3b6118260 (patch)
tree813c03c5142cea0f0ada6f2a81bcca524db6f28a /hotline/files.go
parente42888eb1a6c2bfb6c8bd73baba6acdfddb1f72e (diff)
Fix overwrite of file during upload
Diffstat (limited to 'hotline/files.go')
-rw-r--r--hotline/files.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hotline/files.go b/hotline/files.go
index 04334e9..42e25db 100644
--- a/hotline/files.go
+++ b/hotline/files.go
@@ -180,7 +180,7 @@ func effectiveFile(filePath string) (*os.File, error) {
}
if errors.Is(err, fs.ErrNotExist) {
- file, err = os.OpenFile(filePath+incompleteFileSuffix, os.O_APPEND|os.O_WRONLY, 0644)
+ file, err = os.OpenFile(filePath+incompleteFileSuffix, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
return nil, err
}