svn commit: samba r10964 - branches/SAMBA_3_0/source/client branches/SAMBA_3_0/source/include trunk/source/client trunk/source/include

jerry at samba.org jerry at samba.org
Thu Oct 13 15:51:27 GMT 2005


Author: jerry
Date: 2005-10-13 15:51:25 +0000 (Thu, 13 Oct 2005)
New Revision: 10964

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10964

Log:
BUG 1051: store the directory path so we can send the full name in the unlink call (del tmp\foo)
Modified:
   branches/SAMBA_3_0/source/client/client.c
   branches/SAMBA_3_0/source/include/client.h
   trunk/source/client/client.c
   trunk/source/include/client.h


Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===================================================================
--- branches/SAMBA_3_0/source/client/client.c	2005-10-13 15:16:06 UTC (rev 10963)
+++ branches/SAMBA_3_0/source/client/client.c	2005-10-13 15:51:25 UTC (rev 10964)
@@ -514,6 +514,14 @@
 
 static void do_list_helper(const char *mntpoint, file_info *f, const char *mask, void *state)
 {
+	char *dir_end;
+
+	/* save the directory */
+	pstrcpy( f->dir, mask );
+	if ( (dir_end = strrchr( f->dir, '\\' )) != NULL ) {
+		*dir_end = '\0';
+	}
+
 	if (f->mode & aDIR) {
 		if (do_list_dirs && do_this_one(f)) {
 			do_list_fn(f);
@@ -1613,8 +1621,7 @@
 {
 	pstring mask;
 
-	pstrcpy(mask,cur_dir);
-	pstrcat(mask,finfo->name);
+	pstr_sprintf( mask, "%s\\%s", finfo->dir, finfo->name );
 
 	if (finfo->mode & aDIR) 
 		return;

Modified: branches/SAMBA_3_0/source/include/client.h
===================================================================
--- branches/SAMBA_3_0/source/include/client.h	2005-10-13 15:16:06 UTC (rev 10963)
+++ branches/SAMBA_3_0/source/include/client.h	2005-10-13 15:51:25 UTC (rev 10964)
@@ -44,6 +44,7 @@
 	time_t atime;
 	time_t ctime;
 	pstring name;
+	pstring dir;
 	char short_name[13*3]; /* the *3 is to cope with multi-byte */
 } file_info;
 

Modified: trunk/source/client/client.c
===================================================================
--- trunk/source/client/client.c	2005-10-13 15:16:06 UTC (rev 10963)
+++ trunk/source/client/client.c	2005-10-13 15:51:25 UTC (rev 10964)
@@ -514,6 +514,14 @@
 
 static void do_list_helper(const char *mntpoint, file_info *f, const char *mask, void *state)
 {
+	char *dir_end;
+
+	/* save the directory */
+	pstrcpy( f->dir, mask );
+	if ( (dir_end = strrchr( f->dir, '\\' )) != NULL ) {
+		*dir_end = '\0';
+	}
+
 	if (f->mode & aDIR) {
 		if (do_list_dirs && do_this_one(f)) {
 			do_list_fn(f);
@@ -1613,8 +1621,7 @@
 {
 	pstring mask;
 
-	pstrcpy(mask,cur_dir);
-	pstrcat(mask,finfo->name);
+	pstr_sprintf( mask, "%s\\%s", finfo->dir, finfo->name );
 
 	if (finfo->mode & aDIR) 
 		return;

Modified: trunk/source/include/client.h
===================================================================
--- trunk/source/include/client.h	2005-10-13 15:16:06 UTC (rev 10963)
+++ trunk/source/include/client.h	2005-10-13 15:51:25 UTC (rev 10964)
@@ -44,6 +44,7 @@
 	time_t atime;
 	time_t ctime;
 	pstring name;
+	pstring dir;
 	char short_name[13*3]; /* the *3 is to cope with multi-byte */
 } file_info;
 



More information about the samba-cvs mailing list