You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect this to result in ENOENT. The WASI docs say path_rename is "similar to renameat in POSIX". Looking at the docs for renameat and rename, the following is said:
ENOENT: The link named by oldpath does not exist; or, a directory component in newpath does not exist; or, oldpath or newpath is an empty string.
EINVAL: The new pathname contained a path prefix of the old, or, more generally, an attempt was made to make a directory a subdirectory of itself.
Actual behavior
EINVAL in the resultant error.
Note
path_unlink_file seems to suffer from the same issue - and it's possible there are several other cases I haven't stumbled into yet as well.
The text was updated successfully, but these errors were encountered:
Describe the bug
Calls to path_rename where the target file doesn't exist should result in
ENOENT
. Instead it results inEINVAL
.Steps to reproduce
Here's a simple test program that demonstrates the issue:
Output is as follows:
Expected behavior
I would expect this to result in ENOENT. The WASI docs say
path_rename
is "similar to renameat in POSIX". Looking at the docs forrenameat
andrename
, the following is said:Actual behavior
EINVAL in the resultant error.
Note
path_unlink_file
seems to suffer from the same issue - and it's possible there are several other cases I haven't stumbled into yet as well.The text was updated successfully, but these errors were encountered: