mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
Add a friendly error message if installation fails due to lack of disk space.
This commit is contained in:
parent
274b433120
commit
ef9ceb03f0
3 changed files with 7 additions and 1 deletions
|
@ -67,6 +67,8 @@ FileUtils::IOException::Type FileUtils::IOException::type() const
|
|||
return NoError;
|
||||
case EROFS:
|
||||
return ReadOnlyFileSystem;
|
||||
case ENOSPC:
|
||||
return DiskFull;
|
||||
default:
|
||||
return Unknown;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ class FileUtils
|
|||
* provided by the OS.
|
||||
*/
|
||||
Unknown,
|
||||
ReadOnlyFileSystem
|
||||
ReadOnlyFileSystem,
|
||||
DiskFull
|
||||
};
|
||||
|
||||
virtual const char* what() const throw ()
|
||||
|
|
|
@ -87,6 +87,9 @@ std::string UpdateInstaller::friendlyErrorForError(const FileUtils::IOException&
|
|||
"Re-install it to a location that can be updated and run it from there.";
|
||||
#endif
|
||||
break;
|
||||
case FileUtils::IOException::DiskFull:
|
||||
friendlyError = "The disk is full. Please free up some space and try again.";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue