diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go index c848f92d1fdde2..93be7b6e25e634 100644 --- a/src/internal/syscall/windows/syscall_windows.go +++ b/src/internal/syscall/windows/syscall_windows.go @@ -37,7 +37,6 @@ const ( ERROR_LOCK_VIOLATION syscall.Errno = 33 ERROR_NOT_SUPPORTED syscall.Errno = 50 ERROR_CALL_NOT_IMPLEMENTED syscall.Errno = 120 - ERROR_INVALID_NAME syscall.Errno = 123 ERROR_LOCK_FAILED syscall.Errno = 167 ERROR_NO_TOKEN syscall.Errno = 1008 ERROR_NO_UNICODE_TRANSLATION syscall.Errno = 1113 diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go index 05c29c7b2060ad..a012d7249dd3d5 100644 --- a/src/syscall/syscall_windows.go +++ b/src/syscall/syscall_windows.go @@ -183,6 +183,7 @@ func (e Errno) Is(target error) bool { return e == ERROR_FILE_NOT_FOUND || e == _ERROR_BAD_NETPATH || e == ERROR_PATH_NOT_FOUND || + e == ERROR_INVALID_NAME || e == ENOENT case errorspkg.ErrUnsupported: return e == _ERROR_NOT_SUPPORTED || diff --git a/src/syscall/types_windows.go b/src/syscall/types_windows.go index fa340531782bd5..2592c4ddb496a8 100644 --- a/src/syscall/types_windows.go +++ b/src/syscall/types_windows.go @@ -16,6 +16,7 @@ const ( ERROR_BROKEN_PIPE Errno = 109 ERROR_BUFFER_OVERFLOW Errno = 111 ERROR_INSUFFICIENT_BUFFER Errno = 122 + ERROR_INVALID_NAME Errno = 123 ERROR_MOD_NOT_FOUND Errno = 126 ERROR_PROC_NOT_FOUND Errno = 127 ERROR_DIR_NOT_EMPTY Errno = 145