svn commit: samba r14803 - in
branches/SAMBA_4_0/source/ntvfs/common: .
tridge at samba.org
tridge at samba.org
Thu Mar 30 05:45:43 GMT 2006
Author: tridge
Date: 2006-03-30 05:45:43 +0000 (Thu, 30 Mar 2006)
New Revision: 14803
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14803
Log:
copy with the root directory, which has /. on the end of the path
Modified:
branches/SAMBA_4_0/source/ntvfs/common/notify.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-03-30 05:36:09 UTC (rev 14802)
+++ branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-03-30 05:45:43 UTC (rev 14803)
@@ -227,6 +227,8 @@
{
NTSTATUS status;
struct notify_list *listel;
+ char *path = NULL;
+ size_t len;
status = notify_load(notify);
NT_STATUS_NOT_OK_RETURN(status);
@@ -239,14 +241,29 @@
return NT_STATUS_NO_MEMORY;
}
+ /* cope with /. on the end of the path */
+ len = strlen(e->path);
+ if (len > 1 && e->path[len-1] == '.' && e->path[len-2] == '/') {
+ path = talloc_strndup(notify, e->path, len-2);
+ }
+
notify->array->entries[notify->array->num_entries] = *e;
notify->array->entries[notify->array->num_entries].private = private;
notify->array->entries[notify->array->num_entries].server = notify->server;
+
+ if (path) {
+ notify->array->entries[notify->array->num_entries].path = path;
+ }
+
notify->array->num_entries++;
status = notify_save(notify);
NT_STATUS_NOT_OK_RETURN(status);
+ if (path) {
+ talloc_free(path);
+ }
+
listel = talloc(notify, struct notify_list);
NT_STATUS_HAVE_NO_MEMORY(listel);
More information about the samba-cvs
mailing list