char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
// First try to remove it as a file.
int r = __wasilibc_nocwd___wasilibc_unlinkat(dirfd, relative_path);
- if (r != 0 && (errno == EISDIR || errno == ENOTCAPABLE)) {
+ if (r != 0 && (errno == EISDIR || errno == ENOENT)) {
// That failed, but it might be a directory.
r = __wasilibc_nocwd___wasilibc_rmdirat(dirfd, relative_path);
// If it isn't a directory, we lack capabilities to remove it as a file.
if (errno == ENOTDIR)
- errno = ENOTCAPABLE;
+ errno = ENOENT;
}
return r;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(dirname, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return NULL;
}
char *relative_path;
int dirfd = find_relpath(dir, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(linkpath, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
new_dirfd, new_relative_path, 0);
}
- // We couldn't find a preopen for it; indicate that we lack capabilities.
- errno = ENOTCAPABLE;
+ // We couldn't find a preopen for it; fail as if we can't find the path.
+ errno = ENOENT;
return -1;
}
new_dirfd, new_relative_path);
}
- // We couldn't find a preopen for it; indicate that we lack capabilities.
- errno = ENOTCAPABLE;
+ // We couldn't find a preopen for it; fail as if we can't find the path.
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *relative_path;
int dirfd = find_relpath(path, &relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
int old_dirfd = find_relpath(oldpath, &old_relative_path);
int new_dirfd = find_relpath(newpath, &new_relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (old_dirfd == -1 || new_dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *new_relative_path;
int new_dirfd = find_relpath(newpath, &new_relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (new_dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *old_relative_path;
int old_dirfd = find_relpath(oldpath, &old_relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (old_dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *to_relative_path;
int to_dirfd = find_relpath(to, &to_relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (to_dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}
char *from_relative_path;
int from_dirfd = find_relpath(from, &from_relative_path);
- // If we can't find a preopen for it, indicate that we lack capabilities.
+ // If we can't find a preopen for it, fail as if we can't find the path.
if (from_dirfd == -1) {
- errno = ENOTCAPABLE;
+ errno = ENOENT;
return -1;
}