Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unzip with size 0 #7

Closed
chcg opened this issue Nov 16, 2018 · 6 comments
Closed

Unzip with size 0 #7

chcg opened this issue Nov 16, 2018 · 6 comments

Comments

@chcg
Copy link

chcg commented Nov 16, 2018

See notepad-plus-plus/nppPluginList#11
and https://notepad-plus-plus.org/community/topic/16642/npp-snippets-plug-in-and-plug-in-manager

Some files are unzipped with size 0.

@donho
Copy link
Member

donho commented Dec 20, 2018

a4f12fd

@donho donho closed this as completed Dec 20, 2018
@dinkumoil
Copy link

dinkumoil commented Dec 20, 2018

@donho

I have no good news. I wrote a script to automatically test downloading and unzipping all plugins which are part of the latest version of the plugin list. I have used a self compiled debug build of latest GUP.exe since the download link you provided somewhere doesn't work.

I found issues with the plugins listed below. During unzipping the ZIP packages of the first three ones the following error message is shown:

Can't unzip: Operation not permitted or decompression failed

With the TagsView plugin it's even worse. No error message was shown but it wasn't unzipped correctly, some files haven't been unpacked.

There may be more bugs I havn't discovered yet. The one regarding TagsView plugin I found when I searched for 0 byte files.

Pork2Sausage

Complete directory structure of ZIP file:

|
|   license.txt
|   pork2sausage.dll
|   readmetxt
|   
+---Config
|       pork2Sausage.ini
|       
\---demo
    \---zip.base64
            commons-codec-1.4.jar
            readme.txt
            zipB64.java

Unzipping stops after creating the following structure:

|
|    Config      <-- These should be directories
|    demo        <-- but they are created as files

NppCalc

Complete directory structure of ZIP file:

|
|   NppCalc.dll
|   
\---doc
    \---NppCalc
            HelpNppCalcEn_1.5.txt
            HelpNppCalcRu_1.5.txt

Unzipping stops after creating the following structure:

|
|    doc      <-- This should be a directory but it is created as a file

CSScriptNpp

Complete directory structure of ZIP file:

|
|   CSScriptNpp.dll
|   
\---CSScriptNpp
    |   CompatibilityTest.exe
    |   cscs.exe
    |   cscs.v3.5.exe
    |   CSScriptIntellisense.dll
    |   CSScriptLibrary.dll
    |   CSScriptLibrary.xml
    |   CSScriptNpp.asm.dll
    |   CSSRoslynProvider.dll
    |   css_dbg.exe
    |   css_dbg.pdb
    |   csws.exe
    |   ICSharpCode.NRefactory.CSharp.dll
    |   ICSharpCode.NRefactory.dll
    |   Intellisense.Common.dll
    |   launcher.exe
    |   Mono.Cecil.dll
    |   npp_jit.exe
    |   nuget.exe
    |   syntaxer.exe
    |   Updater.exe
    |   
    \---Mdbg
            corapi.dll
            DbgAgent.dll
            enc.dll
            mdbg.exe
            mdbgeng.dll
            mdbgext.dll
            mdbghost_32.exe
            mdbghost_64.exe
            NativeDebugWrappers.dll
            npp.dll
            raw.dll

Unzipping stops after creating the following structure:

|   
|    CSScriptNpp          <-- This should be a directory but it is created as a file
|    CSScriptNpp.dll

TagsView

Complete directory structure of ZIP file:

|
|   TagsView.dll
|   
+---doc
|       TagsView.txt
|       
\---TagsView
        COPYING
        ctags.exe
        ctags.html
        ctags.opt
        EXTENDING.html
        README

Unzipping produced the following structure:

|
|   TagsView            <-- This should be a directory but it is created as a file.
|   TagsView.dll
|   
\---doc
        TagsView.txt

@donho
Copy link
Member

donho commented Dec 21, 2018

@dinkumoil Thank you very much for catching all these error.
I do believe it's fixed in this binary (tested with all the not working plugins mentioned above):
https://notepad-plus-plus.org/temp/GUP_NEW3.zip

However, due to the unreliable of unzip core component, the directory (leaf) can still be treated as a file, and there's no way to fix it.

@donho
Copy link
Member

donho commented Dec 21, 2018

Please reopen it if it's not fixed totally by;
dfbc2ad

@donho donho closed this as completed Dec 21, 2018
@dinkumoil
Copy link

@donho It works!

I ran my test script and GUP.exe downloaded and unzipped all plugins.

My test script does the same using CURL.exe for downloading and Windows Explorer OLE automation object for unzipping. With a directory comparison using BeyondCompare I was able to verify that the output of GUP.exe and of my own routines is identical.

Thank you for your hard work!

@donho
Copy link
Member

donho commented Dec 21, 2018

@dinkumoil
Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants