diff --git a/Utilities/File.cpp b/Utilities/File.cpp index cc0c60c71d..d7afb64f12 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -153,6 +153,7 @@ static fs::error to_error(int e) case EINVAL: return fs::error::inval; case EACCES: return fs::error::acces; case ENOTEMPTY: return fs::error::notempty; + case EROFS: return fs::error::readonly; default: fmt::throw_exception("Unknown system error: %d.", e); } } @@ -1751,6 +1752,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case fs::error::exist: return "Already exists"; case fs::error::acces: return "Access violation"; case fs::error::notempty: return "Not empty"; + case fs::error::readonly: return "Read only"; } return unknown; diff --git a/Utilities/File.h b/Utilities/File.h index 13896e2919..d28dca19ce 100644 --- a/Utilities/File.h +++ b/Utilities/File.h @@ -518,6 +518,7 @@ namespace fs exist, acces, notempty, + readonly, }; // Error code returned