Don't rewrite EBUSY to EINVAL in path_rename.

This commit is contained in:
Dan Gohman
2019-04-23 12:34:02 -07:00
parent 049c926e08
commit ce3c0d98d3

View File

@@ -1993,8 +1993,7 @@ __wasi_errno_t wasmtime_ssp_path_rename(
path_put(&old_pa); path_put(&old_pa);
path_put(&new_pa); path_put(&new_pa);
if (ret < 0) { if (ret < 0) {
// Linux returns EBUSY in cases where EINVAL would be more suited. return convert_errno(errno);
return errno == EBUSY ? __WASI_EINVAL : convert_errno(errno);
} }
return 0; return 0;
} }