fix error when out of disk space; closes pterodactyl/panel#3273

This commit is contained in:
Dane Everitt 2021-04-18 14:48:42 -07:00
parent 0676a82a21
commit fb0e769306

View File

@ -134,7 +134,7 @@ func (e *RequestError) getAsFilesystemError() (int, string) {
return http.StatusBadRequest, "Cannot perform that action: file is a directory."
}
if filesystem.IsErrorCode(e.err, filesystem.ErrCodeDiskSpace) || strings.Contains(e.err.Error(), "filesystem: not enough disk space") {
return http.StatusBadRequest, "Cannot perform that action: file is a directory."
return http.StatusBadRequest, "Cannot perform that action: not enough disk space available."
}
if strings.HasSuffix(e.err.Error(), "file name too long") {
return http.StatusBadRequest, "Cannot perform that action: file name is too long."