bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot mkdir: Is a directory


From: Paul Eggert
Subject: Re: Cannot mkdir: Is a directory
Date: Fri, 8 Dec 2000 09:34:56 -0800 (PST)

> From: "John David Anglin" <address@hidden>
> Date: Fri, 8 Dec 2000 11:38:29 -0500 (EST)
> 
> An error occurs with tar-1.13.18 under vax ultrix 4.3 when extracting an
> archive when it does a mkdir..  For example,
> 
> # gzcat Z/textutils-2.0.9.tar.gz|tar xf -
> /usr/local/bin/gtar: textutils-2.0.9/: Cannot mkdir: Is a directory
> 
> I think the trailing '/' needs to be stripped.

Thanks for your bug report.  The following patch should fix things:

@@ -1015,4 +1022,11 @@ extract_archive (void)
 
     really_dir:
+
+      /* Remove trailing "/", as VAX Ultrix 4.3 rejects it, and on
+        some systems it causes symlinks to be followed.  */
+      while (FILESYSTEM_PREFIX_LEN (CURRENT_FILE_NAME) < name_length
+            && ISSLASH (CURRENT_FILE_NAME[name_length - 1]))
+       CURRENT_FILE_NAME[--name_length] = '\0';
+
       if (incremental_option)
        {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]