summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_setfileinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 72c061078c..9f5153eb4b 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -147,18 +147,12 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
return status;
}
- if (rename(name->full_name, name2->full_name) == -1) {
- return pvfs_map_errno(pvfs, errno);
+ status = pvfs_do_rename(pvfs, name->full_name, name2->full_name);
+ if (NT_STATUS_IS_OK(status)) {
+ name->full_name = talloc_steal(name, name2->full_name);
+ name->original_name = talloc_steal(name, name2->original_name);
}
- notify_trigger(pvfs->notify_context,
- NOTIFY_ACTION_MODIFIED,
- FILE_NOTIFY_CHANGE_FILE_NAME,
- name->full_name);
-
- name->full_name = talloc_steal(name, name2->full_name);
- name->original_name = talloc_steal(name, name2->original_name);
-
return NT_STATUS_OK;
}