svn commit: samba r2499 - in branches/SAMBA_4_0/source/client: .

tridge at samba.org tridge at samba.org
Wed Sep 22 05:15:56 GMT 2004


Author: tridge
Date: 2004-09-22 05:15:56 +0000 (Wed, 22 Sep 2004)
New Revision: 2499

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/client&rev=2499&nolog=1

Log:
- use more efficient wildcard delete in smbclient

- use "*.*" instead of "*" when connected to ancient servers 





Modified:
   branches/SAMBA_4_0/source/client/client.c


Changeset:
Modified: branches/SAMBA_4_0/source/client/client.c
===================================================================
--- branches/SAMBA_4_0/source/client/client.c	2004-09-22 05:14:59 UTC (rev 2498)
+++ branches/SAMBA_4_0/source/client/client.c	2004-09-22 05:15:56 UTC (rev 2499)
@@ -624,7 +624,12 @@
 			pstrcat(mask,p);
 	}
 	else {
-		pstrcat(mask,"*");
+		if (cli->tree->session->transport->negotiate.protocol <= 
+		    PROTOCOL_LANMAN1) {	
+			pstrcat(mask,"*.*");
+		} else {
+			pstrcat(mask,"*");
+		}
 	}
 
 	do_list(mask, attribute, display_finfo, recurse, True);
@@ -1528,24 +1533,6 @@
 /****************************************************************************
 delete some files
 ****************************************************************************/
-static void do_del(file_info *finfo)
-{
-	pstring mask;
-
-	pstrcpy(mask,cur_dir);
-	pstrcat(mask,finfo->name);
-
-	if (finfo->mode & FILE_ATTRIBUTE_DIRECTORY) 
-		return;
-
-	if (NT_STATUS_IS_ERR(smbcli_unlink(cli->tree, mask))) {
-		d_printf("%s deleting remote file %s\n",smbcli_errstr(cli->tree),mask);
-	}
-}
-
-/****************************************************************************
-delete some files
-****************************************************************************/
 static int cmd_del(const char **cmd_ptr)
 {
 	pstring mask;
@@ -1563,7 +1550,9 @@
 	}
 	pstrcat(mask,buf);
 
-	do_list(mask, attribute,do_del,False,False);
+	if (NT_STATUS_IS_ERR(smbcli_unlink(cli->tree, mask))) {
+		d_printf("%s deleting remote file %s\n",smbcli_errstr(cli->tree),mask);
+	}
 	
 	return 0;
 }



More information about the samba-cvs mailing list