From 13ea765008a2b8816dc190701e6e6cdc85312e66 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Tue, 12 Nov 1996 18:15:42 +0000 Subject: Gnu tar has problems creating an archive which contains a file with a hard link to another file which has a long (>=100 char) name. When listing such an archive, the name of the link is truncated to 99 characters, and when extracting such an archive, an error is reported because it is trying to create a hard link to a file which doesn't exist. This patch fixes that problem and has also been sent to the GNU maintainers. Closes PR#1992 Submitted-By: David Dawes --- gnu/usr.bin/tar/create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/usr.bin/tar/create.c') diff --git a/gnu/usr.bin/tar/create.c b/gnu/usr.bin/tar/create.c index c3be00cb1a1d8..00e353fe86724 100644 --- a/gnu/usr.bin/tar/create.c +++ b/gnu/usr.bin/tar/create.c @@ -313,7 +313,7 @@ dump_file (p, curdev, toplevel) } link_name++; } - if (link_name - lp->name >= NAMSIZ) + if (strlen(link_name) >= NAMSIZ) write_long (link_name, LF_LONGLINK); current_link_name = link_name; -- cgit v1.3