From ce3c0d98d37a609e99fafa82e29d57ad8b12be3c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 23 Apr 2019 12:34:02 -0700 Subject: [PATCH] Don't rewrite EBUSY to EINVAL in path_rename. --- wasmtime-wasi/sandboxed-system-primitives/src/posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wasmtime-wasi/sandboxed-system-primitives/src/posix.c b/wasmtime-wasi/sandboxed-system-primitives/src/posix.c index 3b2ddf1ffe..6f7ba8ab3d 100644 --- a/wasmtime-wasi/sandboxed-system-primitives/src/posix.c +++ b/wasmtime-wasi/sandboxed-system-primitives/src/posix.c @@ -1993,8 +1993,7 @@ __wasi_errno_t wasmtime_ssp_path_rename( path_put(&old_pa); path_put(&new_pa); if (ret < 0) { - // Linux returns EBUSY in cases where EINVAL would be more suited. - return errno == EBUSY ? __WASI_EINVAL : convert_errno(errno); + return convert_errno(errno); } return 0; }