Rename to InvalidFilename
This commit is contained in:
parent
861f3c70a2
commit
a898b31662
@ -296,12 +296,11 @@ pub enum ErrorKind {
|
|||||||
/// The filesystem does not support making so many hardlinks to the same file.
|
/// The filesystem does not support making so many hardlinks to the same file.
|
||||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||||
TooManyLinks,
|
TooManyLinks,
|
||||||
/// Filename too long.
|
/// A filename was invalid.
|
||||||
///
|
///
|
||||||
/// The limit might be from the underlying filesystem or API, or an administratively imposed
|
/// This error can also cause if it exceeded the filename length limit.
|
||||||
/// resource limit.
|
|
||||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||||
FilenameInvalid,
|
InvalidFilename,
|
||||||
/// Program argument list too long.
|
/// Program argument list too long.
|
||||||
///
|
///
|
||||||
/// When trying to run an external program, a system or process limit on the size of the
|
/// When trying to run an external program, a system or process limit on the size of the
|
||||||
@ -382,12 +381,12 @@ impl ErrorKind {
|
|||||||
DirectoryNotEmpty => "directory not empty",
|
DirectoryNotEmpty => "directory not empty",
|
||||||
ExecutableFileBusy => "executable file busy",
|
ExecutableFileBusy => "executable file busy",
|
||||||
FileTooLarge => "file too large",
|
FileTooLarge => "file too large",
|
||||||
FilenameInvalid => "filename invalid",
|
|
||||||
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
|
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
|
||||||
FilesystemQuotaExceeded => "filesystem quota exceeded",
|
FilesystemQuotaExceeded => "filesystem quota exceeded",
|
||||||
HostUnreachable => "host unreachable",
|
HostUnreachable => "host unreachable",
|
||||||
Interrupted => "operation interrupted",
|
Interrupted => "operation interrupted",
|
||||||
InvalidData => "invalid data",
|
InvalidData => "invalid data",
|
||||||
|
InvalidFilename => "invalid filename",
|
||||||
InvalidInput => "invalid input parameter",
|
InvalidInput => "invalid input parameter",
|
||||||
IsADirectory => "is a directory",
|
IsADirectory => "is a directory",
|
||||||
NetworkDown => "network down",
|
NetworkDown => "network down",
|
||||||
|
@ -315,7 +315,7 @@ fn kind_from_prim(ek: u32) -> Option<ErrorKind> {
|
|||||||
Deadlock,
|
Deadlock,
|
||||||
CrossesDevices,
|
CrossesDevices,
|
||||||
TooManyLinks,
|
TooManyLinks,
|
||||||
FilenameTooLong,
|
InvalidFilename,
|
||||||
ArgumentListTooLong,
|
ArgumentListTooLong,
|
||||||
Interrupted,
|
Interrupted,
|
||||||
Other,
|
Other,
|
||||||
|
@ -159,7 +159,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
|
|||||||
libc::ENOSPC => StorageFull,
|
libc::ENOSPC => StorageFull,
|
||||||
libc::ENOSYS => Unsupported,
|
libc::ENOSYS => Unsupported,
|
||||||
libc::EMLINK => TooManyLinks,
|
libc::EMLINK => TooManyLinks,
|
||||||
libc::ENAMETOOLONG => FilenameInvalid,
|
libc::ENAMETOOLONG => InvalidFilename,
|
||||||
libc::ENETDOWN => NetworkDown,
|
libc::ENETDOWN => NetworkDown,
|
||||||
libc::ENETUNREACH => NetworkUnreachable,
|
libc::ENETUNREACH => NetworkUnreachable,
|
||||||
libc::ENOTCONN => NotConnected,
|
libc::ENOTCONN => NotConnected,
|
||||||
|
@ -71,7 +71,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
|
|||||||
c::ERROR_FILE_NOT_FOUND => return NotFound,
|
c::ERROR_FILE_NOT_FOUND => return NotFound,
|
||||||
c::ERROR_PATH_NOT_FOUND => return NotFound,
|
c::ERROR_PATH_NOT_FOUND => return NotFound,
|
||||||
c::ERROR_NO_DATA => return BrokenPipe,
|
c::ERROR_NO_DATA => return BrokenPipe,
|
||||||
c::ERROR_INVALID_NAME => return FilenameInvalid,
|
c::ERROR_INVALID_NAME => return InvalidFilename,
|
||||||
c::ERROR_INVALID_PARAMETER => return InvalidInput,
|
c::ERROR_INVALID_PARAMETER => return InvalidInput,
|
||||||
c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory,
|
c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory,
|
||||||
c::ERROR_SEM_TIMEOUT
|
c::ERROR_SEM_TIMEOUT
|
||||||
@ -105,7 +105,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
|
|||||||
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
|
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
|
||||||
c::ERROR_NOT_SAME_DEVICE => return CrossesDevices,
|
c::ERROR_NOT_SAME_DEVICE => return CrossesDevices,
|
||||||
c::ERROR_TOO_MANY_LINKS => return TooManyLinks,
|
c::ERROR_TOO_MANY_LINKS => return TooManyLinks,
|
||||||
c::ERROR_FILENAME_EXCED_RANGE => return FilenameInvalid,
|
c::ERROR_FILENAME_EXCED_RANGE => return InvalidFilename,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user