1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

Merge from Samba 3.0:

>Fix from Craig Barratt <cbarratt@users.sourceforge.net> to fix restore
>with filenames > 100 chars.
>Jeremy.
This commit is contained in:
Tim Potter 0001-01-01 00:00:00 +00:00
parent 675707c33e
commit a7bbfd6367

View File

@ -1054,9 +1054,11 @@ static int get_dir(file_info2 finfo)
has the data. We only want the long file name, as the loop in do_tarput
will deal with the rest.
*/
static char * get_longfilename(file_info2 finfo)
static char *get_longfilename(file_info2 finfo)
{
int namesize = strlen(finfo.name) + strlen(cur_dir) + 2;
/* finfo.size here is the length of the filename as written by the "/./@LongLink" name
* header call. */
int namesize = finfo.size + strlen(cur_dir) + 2;
char *longname = malloc(namesize);
int offset = 0, left = finfo.size;
BOOL first = True;