diff --git a/Utilities/File.cpp b/Utilities/File.cpp index 4a5eccd3cd..44b2ac18e8 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -130,6 +130,7 @@ static fs::error to_error(DWORD e) case ERROR_NOT_READY: return fs::error::noent; case ERROR_FILENAME_EXCED_RANGE: return fs::error::toolong; case ERROR_DISK_FULL: return fs::error::nospace; + case ERROR_NOT_SAME_DEVICE: return fs::error::xdev; default: return fs::error::unknown; } } @@ -172,6 +173,7 @@ static fs::error to_error(int e) case EROFS: return fs::error::readonly; case EISDIR: return fs::error::isdir; case ENOSPC: return fs::error::nospace; + case EXDEV: return fs::error::xdev; default: return fs::error::unknown; } } @@ -2360,6 +2362,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case fs::error::isdir: return "Is a directory"; case fs::error::toolong: return "Path too long"; case fs::error::nospace: return "Not enough space on the device"; + case fs::error::xdev: return "Device mismatch"; case fs::error::unknown: return "Unknown system error"; } diff --git a/Utilities/File.h b/Utilities/File.h index ca9d74bed4..a8c1de8773 100644 --- a/Utilities/File.h +++ b/Utilities/File.h @@ -704,6 +704,7 @@ namespace fs isdir, toolong, nospace, + xdev, unknown };