]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/file_transfer.go
Allow to delete home files / replace files
[rbdr/mobius] / hotline / file_transfer.go
index 626cfff48823030be76618e1cdcfdc22a556f919..4e71bd66a0c511181003b5ce76d00f6c1b555653 100644 (file)
@@ -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()