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

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
if err == errDiskFull {
if errors.Is(err, errDiskFull) || isSysErrNoSpace(err) {
if recursive {
err = removeAll(filePath)
} else {