diff options
Diffstat (limited to 'source3/libsmb/clilist.c')
-rw-r--r-- | source3/libsmb/clilist.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 89ab5d6414..4a1737af49 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -324,11 +324,9 @@ static int interpret_short_filename(struct cli_state *cli, char *p,file_info *fi finfo->mtime = finfo->atime = finfo->ctime; finfo->size = IVAL(p,26); clistr_pull(cli, finfo->name, p+30, sizeof(finfo->name), 12, STR_ASCII); - if (strcmp(finfo->name, "..") && strcmp(finfo->name, ".")) { - strncpy(finfo->short_name,finfo->name, sizeof(finfo->short_name)-1); - finfo->short_name[sizeof(finfo->short_name)-1] = '\0'; - } - + if (strcmp(finfo->name, "..") && strcmp(finfo->name, ".")) + fstrcpy(finfo->short_name,finfo->name); + return(DIR_STRUCT_SIZE); } |