aboutsummaryrefslogtreecommitdiff
path: root/hotline
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-02-04 10:59:32 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-02-04 10:59:32 +0100
commit8cd28eb8cede1c6888cbbcd319a9617304bfc4c1 (patch)
tree6cfec52f435714b0854de2a5994761b46a28f824 /hotline
parentd34160c512a52cf1f5caf59fa00372d3a627e24c (diff)
Allow to delete home files / replace files
Diffstat (limited to 'hotline')
-rw-r--r--hotline/file_transfer.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hotline/file_transfer.go b/hotline/file_transfer.go
index 626cfff..4e71bd6 100644
--- a/hotline/file_transfer.go
+++ b/hotline/file_transfer.go
@@ -316,15 +316,15 @@ func UploadHandler(rwc io.ReadWriter, fullPath string, fileTransfer *FileTransfe
// handler should have returned an error to the client indicating there was an existing file present.
_, err := os.Stat(fullPath)
if err == nil {
- return fmt.Errorf("existing file found: %s", fullPath)
+ // return fmt.Errorf("existing file found: %s", fullPath)
}
- if errors.Is(err, fs.ErrNotExist) {
+ // if errors.Is(err, fs.ErrNotExist) {
// If not found, open or create a new .incomplete file
file, err = os.OpenFile(fullPath+IncompleteFileSuffix, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
return err
}
- }
+ // }
defer file.Close()