diff options
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go')
| -rw-r--r-- | vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go b/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go index 717f8598a..478851729 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go +++ b/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go @@ -36,7 +36,9 @@ func openFile(path string, oflag sys.Oflag, perm fs.FileMode) (*os.File, sys.Err // To match expectations of WASI, e.g. TinyGo TestStatBadDir, return // ENOENT, not ENOTDIR. case sys.ENOTDIR: - errno = sys.ENOENT + if !strings.HasSuffix(path, "/") { + errno = sys.ENOENT + } case sys.ENOENT: if isSymlink(path) { // Either symlink or hard link not found. We change the returned |
