diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-05 08:52:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:17 -0500 |
commit | 930e247d5692cc776c434f9caafa90f2ca1a70b1 (patch) | |
tree | c338337012077b82f51cbdc215362e1cd9dcf959 /source4/ntvfs/posix/pvfs_setfileinfo.c | |
parent | 22c1c78b1d3c888508df42ae518fcb9711cec45d (diff) | |
download | samba-930e247d5692cc776c434f9caafa90f2ca1a70b1.tar.gz samba-930e247d5692cc776c434f9caafa90f2ca1a70b1.tar.bz2 samba-930e247d5692cc776c434f9caafa90f2ca1a70b1.zip |
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)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_setfileinfo.c | 14 |
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; } |