diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-13 15:51:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:58 -0500 |
commit | 057060feaf7395f475a32f9dad9e149ab0fa6a1c (patch) | |
tree | 9bbf95fc4dfdbda7b083dc39f095d6b020ce4cff /source3/client | |
parent | 1bd3cbd3125e03117aed4288f1addcdfd9f1f109 (diff) | |
download | samba-057060feaf7395f475a32f9dad9e149ab0fa6a1c.tar.gz samba-057060feaf7395f475a32f9dad9e149ab0fa6a1c.tar.bz2 samba-057060feaf7395f475a32f9dad9e149ab0fa6a1c.zip |
r10964: BUG 1051: store the directory path so we can send the full name in the unlink call (del tmp\foo)
(This used to be commit 49b8d7d7f5ed93a2b9b21404194452f35bcf7b26)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 61c4c8e4be..e2b3486990 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -514,6 +514,14 @@ static int do_list_queue_empty(void) 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 @@ static void do_del(file_info *finfo) { pstring mask; - pstrcpy(mask,cur_dir); - pstrcat(mask,finfo->name); + pstr_sprintf( mask, "%s\\%s", finfo->dir, finfo->name ); if (finfo->mode & aDIR) return; |