mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
cryptfs: fix quota for overwrites if upload fails
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -746,6 +746,20 @@ func HasTruncateSupport(fs Fs) bool {
|
||||
return IsLocalOsFs(fs) || IsSFTPFs(fs) || IsHTTPFs(fs)
|
||||
}
|
||||
|
||||
// HasImplicitAtomicUploads returns true if the fs don't persists partial files on error
|
||||
func HasImplicitAtomicUploads(fs Fs) bool {
|
||||
if strings.HasPrefix(fs.Name(), s3fsName) {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(fs.Name(), gcsfsName) {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(fs.Name(), azBlobFsName) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// HasOpenRWSupport returns true if the fs can open a file
|
||||
// for reading and writing at the same time
|
||||
func HasOpenRWSupport(fs Fs) bool {
|
||||
|
||||
Reference in New Issue
Block a user