This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin64, 'unzip -d' misbehaviour vs. Cygwin32

On 30/09/2014 08:35, Wladimir Mutel wrote:
     Dear all,

     I have a .zip archive on a different NTFS filesystem than Cygwin64 TMP
     folder (say, .zip on I: and TMP on C:). I create a temporary folder
     by 'mktemp -d' and then try to unpack .zip archive into that folder :
     unzip -d $folder $archive
     I notice that files are unpacked into I:\TMP\ folder instead of
     C:\Cygwin64\tmp\ (unzip recreates temporary subfolder with same name
     inside I:\TMP\, while initial subfolder under c:\cygwin64\tmp\
     remains empty)
     Trying to work around this problem, I do this :
     p=$(pwd)/$archive # archive is relative path under /cygdrive/i/ ,
                           # so I construct abs.path
     ( cd $folder
       unzip $p ) # in subshell to keep current pwd unchanged
         Then I get a message like :
unzip:  cannot find either /cygdrive/i/path/ or

     Even more, unzip -v /cygdrive/i/path/ invariably fails
in this way under Cygwin64. What I see is that unzip accepts only
relative paths for archive files. And that it improperly handles
specified unpack directory (-d).

     No such problems are observable under Cygwin32. unzip works exactly
as specified with both absolute and relative paths, as well as with
unpack folder on different filesystem from .zip archive.

     Please try to reproduce my findings and fix them on Cygwin64 side
     or tell me how could I fix them myself (if it is my personal problem).

     Thanks in advance for your help.

works fine for me on any relative or absolute destination

$ unzip software/windows_utilities/usb/ -d /cygdrive/c/temp/pippo
Archive:  software/windows_utilities/usb/
  inflating: /cygdrive/c/temp/pippo/USBDeview.exe
  inflating: /cygdrive/c/temp/pippo/USBDeview.chm
  inflating: /cygdrive/c/temp/pippo/readme.txt

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]