From 5c14e4c916d76ce35ee2b07bf832d5f3b6118260 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:45:27 -0700 Subject: Fix overwrite of file during upload --- hotline/files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hotline/files.go') 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 } -- cgit