1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ZIP /U a little screwy

Discussion in 'Support' started by vefatica, Nov 4, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    In addition to what's below, Explorer shows the zipfile with 4tray64.dll having an older time and trying to drag it out of the Explorer window (say to the desktop) results in an error, 0x80004005 (unspecified).

    Code:
    l:\projects\4tray\release> dir /km 4tray.dll
    2012-11-04  13:26          40,960  4Tray.dll
     
    l:\projects\4tray\release> dir /km ..\x64\release\4tray64.dll
    2012-11-04  13:26          46,080  4Tray64.dll
     
    l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
     
    <= L:\Projects\4Tray\x64\Release\4Tray64.dll
     
    l:\projects\4tray\release> zip /c 4tray.zip
    M
     
    P
    u
    W
    ┼
    0 L
    o
    T
    t
    ⁿ
    TCC: Error in archive L:\Projects\4Tray\release\4tray.zip :
      Wrong local header signature. "4Tray64.dll"
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    And even after making a new (seemingly working) zipfile from scratch, ZIP /C screws up.
    Code:
    l:\projects\4tray\release> zip /c 4tray.zip
    M
     
    P
    u
    W
    ┼
    0 L
    o
    T
    t
    ⁿ
    M
    ♦
    ♣
    ]
    ╦
    ♀
    H
    L
    n
    (
    C
     
     
    l:\projects\4tray\release>
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    What do you think /C is going to do?

    If you're trying to display the filenames, you should be using /V. /C dumps the physical contents of the zip file, not the names. (And with binary files, that'll be terminated at the first null character in the file.)
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    My mistake (for confusing "contents" with a listing). But my original report about ZIP /U still seems in order.
    Code:
    l:\projects\4tray\release> zip /v 4tray.zip
    2012-11-04  22:37         40,960  51%  4Tray.dll
    2012-11-04  13:26         46,080  53%  4Tray64.dll
    
    l:\projects\4tray\release> touch ..\x64\Release\4Tray64.dll
    2012-11-05 20:23:27.479  L:\Projects\4Tray\x64\Release\4Tray64.dll
    
    l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
    
    <= L:\Projects\4Tray\x64\Release\4Tray64.dll
    
    l:\projects\4tray\release> zip /v 4tray.zip
    2012-11-04  22:37         40,960  51%  4Tray.dll
    2012-11-04  13:26         46,080  53%  4Tray64.dll
    
    l:\projects\4tray\release>
    
    Note how the archive's timestamp for 4tray64.dll was not updated. Also at this point, 4tray64.dll cannot be extracted with Explorer (error as described in my original post).
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    With build 44:
    Code:
    l:\projects\4tray\release> del 4tray.zip
    Deleting L:\Projects\4Tray\release\4tray.zip
        1 file deleted            20,480 bytes freed
     
    l:\projects\4tray\release> zip 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
    <= L:\Projects\4Tray\release\4Tray.dll
    <= L:\Projects\4Tray\x64\Release\4Tray64.dll
     
    l:\projects\4tray\release> shellex 4tray.zip
    At this point, in Explorer, I can drag either file out of the zip folder.

    Code:
    l:\projects\4tray\release> touch ..\x64\Release\4Tray64.dll
    2012-11-05 23:10:58.201  L:\Projects\4Tray\x64\Release\4Tray64.dll
     
    l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
     
    <= L:\Projects\4Tray\x64\Release\4Tray64.dll
     
    l:\projects\4tray\release> shellex 4tray.zip
     
    l:\projects\4tray\release> ver
     
    TCC  14.02.44  Windows 7 [Version 6.1.7601]
     
    l:\projects\4tray\release> zip /v 4tray.zip
    2012-11-04  22:37        40,960  51%  4Tray.dll
    2012-11-05  23:05        46,080  53%  4Tray64.dll
     
    l:\projects\4tray\release>
    At this point I cannot drag 4tray64.dll out of the zip-folder. And it's timestamp (23:10, from TOUCH) was not changed in the zip file. The error message box says "An unexpected error is keeping you from copying the file. [...] Error 0x80004005: Unspecified error [...]".
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    And after all that (previous post), TCC itself says:
    Code:
    l:\projects\4tray\release> copy 4tray.zip v:\
    L:\Projects\4Tray\release\4tray.zip => V:\4tray.zip
        1 file copied
     
    l:\projects\4tray\release> v:\
     
    v:\> which unzip
    unzip is an internal command
     
    v:\> unzip 4tray.zip
    => V:\4Tray.dll
    TCC: Error in archive V:\4tray.zip :
      Wrong local header signature. "4Tray64.dll"
     
    v:\>
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    Here's a simpler version, on another machine (with build 44). It doesn't seem to like the combination of "/U" and "..\...".

    Code:
    v:\test> zip ttt.zip ..\tictactoe.exe
    <= V:\tictactoe.exe
     
    v:\test> unzip ttt.zip
    => V:\test\tictactoe.exe
     
    v:\test> del tictactoe.exe
    Deleting V:\test\tictactoe.exe
        1 file deleted              8,192 bytes freed
     
    v:\test> touch ..\tictactoe.exe
    11/05/2012 23:47:54.013  V:\tictactoe.exe
     
    v:\test> zip /u ttt.zip ..\tictactoe.exe
    <= V:\tictactoe.exe
     
    v:\test> unzip ttt.zip
    TCC: Error in archive V:\test\ttt.zip :
      Wrong local header signature. "tictactoe.exe"
     
    v:\test>
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    Actually, it doesn't have anything to do with the "..".
    Code:
    v:\test> zip ttt.zip v:\tictactoe.exe
    <= V:\tictactoe.exe
     
    v:\test> unzip ttt.zip
    => V:\test\tictactoe.exe
     
    v:\test> del tictactoe.exe
    Deleting V:\test\tictactoe.exe
        1 file deleted              8,192 bytes freed
     
    v:\test> touch v:\tictactoe.exe
    11/06/2012 11:12:14.108  V:\tictactoe.exe
     
    v:\test> zip /u ttt.zip v:\tictactoe.exe
    <= V:\tictactoe.exe
     
    v:\test> unzip ttt.zip
    TCC: Error in archive V:\test\ttt.zip :
      Wrong local header signature. "tictactoe.exe"
     
    v:\test>
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    It took several tries on a couple of different machines, but I was eventually able to (sporadically) reproduce this. It's a problem in the zip dll; I've notified the developers.
     

Share This Page