diff options
author | jkh <jkh@FreeBSD.org> | 1996-11-12 18:15:42 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-11-12 18:15:42 +0000 |
commit | 80d0490b8edda41215648fb110638ea5db249e5e (patch) | |
tree | c0211185c08bfa142124b794fadd65e28d1b96ef /gnu/usr.bin | |
parent | 913f044de900a1667510774eab3e0de9d3f7f108 (diff) | |
download | FreeBSD-src-80d0490b8edda41215648fb110638ea5db249e5e.zip FreeBSD-src-80d0490b8edda41215648fb110638ea5db249e5e.tar.gz |
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 <dawes@landfill.physics.usyd.edu.au>
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/tar/create.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/tar/create.c b/gnu/usr.bin/tar/create.c index c3be00c..00e353f 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; |