diff --git a/templates/connections.html b/templates/connections.html index cf476543..188df417 100644 --- a/templates/connections.html +++ b/templates/connections.html @@ -4,8 +4,10 @@ {{define "extra_css"}} - + + + {{end}} {{define "page_body"}} @@ -20,7 +22,7 @@
| ID | @@ -82,10 +84,12 @@ {{define "extra_js"}} - - + + + + {{end}} \ No newline at end of file diff --git a/vfs/sftpfs.go b/vfs/sftpfs.go index 29fffb06..759f6f30 100644 --- a/vfs/sftpfs.go +++ b/vfs/sftpfs.go @@ -307,15 +307,15 @@ func (fs *SFTPFs) Create(name string, flag int) (File, *PipeWriter, func(), erro if err == nil && errFlush != nil { err = errFlush } + var errTruncate error + if err != nil { + errTruncate = f.Truncate(n) + } errClose := f.Close() if err == nil && errClose != nil { err = errClose } r.CloseWithError(err) //nolint:errcheck - var errTruncate error - if err != nil { - errTruncate = f.Truncate(n) - } p.Done(err) fsLog(fs, logger.LevelDebug, "upload completed, path: %#v, readed bytes: %v, err: %v err truncate: %v", name, n, err, errTruncate)
|---|