1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

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)
This commit is contained in:
Gerald Carter 2005-10-13 15:51:25 +00:00 committed by Gerald (Jerry) Carter
parent 1bd3cbd312
commit 057060feaf
2 changed files with 10 additions and 2 deletions

View File

@ -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;

View File

@ -44,6 +44,7 @@ typedef struct file_info
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;