summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-15 04:59:45 +0000
committerTim Potter <tpot@samba.org>2003-09-15 04:59:45 +0000
commiteae6e9f155c78a4f448c1a798f9d7d61f53a2795 (patch)
tree01d55da266b84f3d5aadbf248b8caf424a988972 /source3
parenta0fb605c2519bd3a9e3730fcb372977a52c7d25b (diff)
downloadsamba-eae6e9f155c78a4f448c1a798f9d7d61f53a2795.tar.gz
samba-eae6e9f155c78a4f448c1a798f9d7d61f53a2795.tar.bz2
samba-eae6e9f155c78a4f448c1a798f9d7d61f53a2795.zip
Merge from Samba 3.0:
>Fix from Craig Barratt <cbarratt@users.sourceforge.net> to fix restore >with filenames > 100 chars. >Jeremy. (This used to be commit a7bbfd636798232416c044df8a77dbbd8c77f9ed)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/clitar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index b01de5b8e7..f38d6fe91a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -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;