sftpd: improve truncate

quota usage and max allowed write size are now properly updated after a
truncate
This commit is contained in:
Nicola Murino
2020-08-22 10:12:00 +02:00
parent 7381a867ba
commit 5208e4a4ca
22 changed files with 433 additions and 171 deletions

View File

@@ -145,7 +145,7 @@ type ActiveTransfer interface {
GetVirtualPath() string
GetStartTime() time.Time
SignalClose()
Truncate(fsPath string, size int64) error
Truncate(fsPath string, size int64) (int64, error)
}
// ActiveConnection defines the interface for the current active connections