sftpd: fix the max upload file size check for overwrites

improved test case too
This commit is contained in:
Nicola Murino
2020-10-25 08:52:31 +01:00
parent 5ff8f75917
commit 975a2f3632
4 changed files with 15 additions and 3 deletions

View File

@@ -391,9 +391,6 @@ func (c *Connection) handleSFTPUploadToExistingFile(pflags sftp.FileOpenFlags, r
} else {
initialSize = fileSize
}
if maxWriteSize > 0 && isTruncate {
maxWriteSize += fileSize
}
}
vfs.SetPathPermissions(c.Fs, filePath, c.User.GetUID(), c.User.GetGID())