[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] tar 1.16: cannot unpack symlinks in read-only directories
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] tar 1.16: cannot unpack symlinks in read-only directories |
Date: |
Tue, 31 Oct 2006 22:11:40 +0200 |
Eelco Dolstra <address@hidden> wrote:
> It seems that GNU tar 1.16 has a problem unpacking archives that have symlinks
> in read-only directories. Example:
Thank you. Here is the fix:
Index: src/extract.c
===================================================================
RCS file: /cvsroot/tar/tar/src/extract.c,v
retrieving revision 1.95
diff -p -u -r1.95 extract.c
--- src/extract.c 24 Jun 2006 16:48:08 -0000 1.95
+++ src/extract.c 31 Oct 2006 20:10:26 -0000
@@ -871,7 +871,7 @@ create_placeholder_file (char *file_name
if (h && ! h->after_links
&& strncmp (file_name, h->file_name, h->file_name_len) == 0
&& ISSLASH (file_name[h->file_name_len])
- && (base_name (file_name) == file_name + h->file_name_len + 1))
+ && (last_component (file_name) == file_name + h->file_name_len + 1))
{
do
{
Regards,
Sergey