mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
rename: RENAME_NOREPLACE
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user