aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJopStro <joseph.strong@live.co.uk>2022-10-31 21:46:47 +0000
committerJopStro <joseph.strong@live.co.uk>2022-10-31 21:46:47 +0000
commit91ad6b42c5232ebbca22887efffa3f3776011797 (patch)
treef490779d28da1182f0197414750e464fc22ca9dc
parentdad10ef80052d668ad374b99773fa3f7d2fd2f05 (diff)
rename default_dir to current_dir
-rw-r--r--core/os/os_wasi.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/os_wasi.odin b/core/os/os_wasi.odin
index 95e37771e..5d77b4d7c 100644
--- a/core/os/os_wasi.odin
+++ b/core/os/os_wasi.odin
@@ -24,7 +24,7 @@ O_CLOEXEC :: 0x80000
stdin: Handle = 0
stdout: Handle = 1
stderr: Handle = 2
-default_dir: Handle = 3
+current_dir: Handle = 3
write :: proc(fd: Handle, data: []byte) -> (int, Errno) {
iovs := wasi.ciovec_t(data)
@@ -75,7 +75,7 @@ open :: proc(path: string, mode: int = O_RDONLY, perm: int = 0) -> (Handle, Errn
if mode & O_SYNC == O_SYNC {
fdflags += {.SYNC}
}
- fd, err := wasi.path_open(wasi.fd_t(default_dir),{.SYMLINK_FOLLOW},path,oflags,rights,{},fdflags)
+ fd, err := wasi.path_open(wasi.fd_t(current_dir),{.SYMLINK_FOLLOW},path,oflags,rights,{},fdflags)
return Handle(fd), Errno(err)
}
close :: proc(fd: Handle) -> Errno {