unzip extracts directories as symlinks

Bug #147866 reported by Sean Hodges
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unzip (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: unzip

Using "zip" to archive a set of directories, where one or more sub sirectories are symlinks, creates an archive that will not extract properly on another machine. Just to clarify this is WITHOUT using the -y switch (retain symlinks).

Unzip lists the directories and their contents correctly when using -l switch, however attempting to extract them gives a stream of errors:

checkdir error: EngineTest/materials exists but is not directory
                 unable to process EngineTest/materials/.svn/text-base/energy2_red.xml.svn-base.
checkdir error: EngineTest/materials exists but is not directory
                 unable to process EngineTest/materials/.svn/text-base/charon_flare3.xml.svn-base.
checkdir error: EngineTest/materials exists but is not directory
                 unable to process EngineTest/materials/.svn/text-base/charon_yellowclouds1.xml.svn-base.
.
.
...and finally...

finishing deferred symbolic links:
  EngineTest/textures -> /home/kazade/Desktop/mt-engine/build/codeblocks/textures
  EngineTest/maps -> /home/kazade/Desktop/mt-engine/build/codeblocks/maps
  EngineTest/materials -> /home/kazade/Desktop/mt-engine/build/codeblocks/materials

Sorry for the short bug report, I'll expand on it if anyone asks.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 RC or later?

Changed in unzip:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in unzip:
status: Incomplete → Invalid
Revision history for this message
zyodei (buddhaflow) wrote :
Download full text (6.1 KiB)

I am having this same problem, it is driving me nuts. I can't unzip this .zip archive, so my whole workflow to a day is ground to a halt :(

I am trying to unzip http://wordpressthemesbase.com/download/762 using both file roller and the command line unzip.

In both instances, I get the exact same problem:

checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/readme.txt.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/favicon.ico.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/sidebar.php.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/single.php.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/menu-hover.gif.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/content-bg.png.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/footer.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/icon-category.gif.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/texture.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/lidot.gif.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/h2-bg.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/NoteRss.png.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/header-bg.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/read-more-icon.gif.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/postinfo-bg.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/menu-right.gif.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/blockquote-bg.jpg.
checkdir error: /home/sasha/Desktop/soulvision/soulvision exists but is not directory
                 unable to process soulvision/images/submit-bg....

Read more...

Revision history for this message
SpamHandle (mail+ubuntubugs) wrote :

When trying to unzip some wordpress themes I had the same issue.
I've done some testing and found out why this happens. :)

If you do unzip -l on your zip file and the initial directory doesn't have a trailing slash, unzip will incorrectly create a file therefore blocking any attempts to write further files into that directory.

Examples:

1. This zip file causes errors on attempts to expand it.

unzip -l bluedark-10.zip

Archive: bluedark-10.zip
  Length Date Time Name
--------- ---------- ----- ----
        0 2010-01-21 07:06 bluedark-10 <------------ Notice there's no trailing slash for directory names
     1560 2009-11-09 17:35 bluedark-10/sidebar.php
     3375 2009-11-09 17:35 bluedark-10/header1.php
      222 2009-11-09 17:35 bluedark-10/links.php
     1942 2009-11-09 17:35 bluedark-10/single.php
        0 2009-11-09 17:35 bluedark-10/images <------------ Same here too !
     2820 2009-11-09 17:35 bluedark-10/images/panel.png
<snip>

2. This one works fine.

unzip -l themorningafter.zip

Archive: themorningafter.zip
  Length Date Time Name
--------- ---------- ----- ----
        0 2010-09-10 10:16 themorningafter/ <------------ This time, the trailing slash is present
     1124 2010-06-21 11:36 themorningafter/ie.css
     4457 2010-09-10 10:12 themorningafter/comments.php
     4656 2010-09-10 10:12 themorningafter/home.php
     3781 2010-09-10 10:12 themorningafter/archive.php
        0 2010-09-10 10:16 themorningafter/styles/ <------------ Here too.
        0 2010-09-10 10:16 themorningafter/styles/default/
       18 2010-06-21 11:36 themorningafter/styles/default.css
     4452 2010-09-10 10:12 themorningafter/header.php
        0 2010-09-10 10:16 themorningafter/functions/ <------------ Yada yada.
     1996 2010-06-21 11:36 themorningafter/functions/admin-theme-page.php
<snip>

Hope this helps someone.
I'll check with the upsteam developers, see if this issue is known about and post back more info.

Regards,
SpamHandle

Revision history for this message
SpamHandle (mail+ubuntubugs) wrote :

Just posted an open question to Info-Zip Forum for some feedback.
http://www.info-zip.org/board/board.pl?m-1284468895/

Let's see what happens.

S.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.