From 930e247d5692cc776c434f9caafa90f2ca1a70b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Apr 2006 08:52:03 +0000 Subject: r14925: trigger NOTIFY_ACTION_OLD_NAME and NOTIFY_ACTION_NEW_NAME events for renames, if in the same directory. For renames between directories generate NOTIFY_ACTION_REMOVED and NOTIFY_ACTION_ADDED (This used to be commit 2ac248edf05c3ee715165f2b33055de480743e87) --- source4/ntvfs/posix/pvfs_setfileinfo.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c') 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; } -- cgit