rename: RENAME_NOREPLACE

This commit is contained in:
Matheus
2026-07-14 16:37:48 -03:00
parent b24cc36299
commit afd9d8d3a0
6 changed files with 38 additions and 2 deletions
+3
View File
@@ -352,6 +352,9 @@ static int tmpfs_rename(vnode_t *source, vnode_t *sourcefile, char *oldname, vno
oldnode = v;
if (oldnode) {
if (flags & RENAME_NOREPLACE)
return EEXIST;
// we are replacing an existing link
// do some checks expected by posix
if (sourcefile->type != V_TYPE_DIR && oldnode->type == V_TYPE_DIR)