allow all disk full errors to be handled (#19117)

This commit is contained in:
Harshavardhana 2024-02-24 09:11:14 -08:00 committed by GitHub
parent f965434022
commit c2b54d92f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1184,7 +1184,7 @@ func (s *xlStorage) moveToTrash(filePath string, recursive, immediatePurge bool)
} }
// ENOSPC is a valid error from rename(); remove instead of rename in that case // ENOSPC is a valid error from rename(); remove instead of rename in that case
if err == errDiskFull { if errors.Is(err, errDiskFull) || isSysErrNoSpace(err) {
if recursive { if recursive {
err = removeAll(filePath) err = removeAll(filePath)
} else { } else {