X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/0ee4d86eeffe9c72dffd9e92cb33b27c8950940f..ba201a220aa723f98c6a81d74dc4229bf89b282a:/hotline/file_transfer.go 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()