Fix remove_directory_trailing_slashes on Windows

This commit provides a fix for `remove_directory_trailing_slashes`
test case on Windows. It adds a missing mapping between the following
WinAPI error code and WASI error:

```
ERROR_DIRECTORY => __WASI_ENOTDIR
```

where `ERROR_DIRECTORY` is thrown when the directory name is invalid.
This commit is contained in:
Jakub Konka
2019-10-20 09:43:13 +02:00
parent ef010b44b7
commit 0d63cc2dbc
3 changed files with 4 additions and 2 deletions

View File

@@ -84,6 +84,8 @@ win_error_expand! {
ERROR_NOT_A_REPARSE_POINT,
/// An attempt was made to move the file pointer before the beginning of the file.
ERROR_NEGATIVE_SEEK,
/// The directory name is invalid.
ERROR_DIRECTORY,
}
impl WinError {