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

fix some part of the decompress issue seen with #7 #8

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@chcg
Copy link

commented Nov 28, 2018

fix some part of the decompress issue seen with #7

@dinkumoil

This comment has been minimized.

Copy link

commented Dec 2, 2018

@chcg

The plugins Emmet, Snippets and BookmarkManager have unzip issues with GUP.exe v5.0.4 according to this list. I have tested these plugins with a patched version of GUP.exe that included your code.

Results

Emmet

The ZIP file of Emmet gets unzipped correctly now. Its directory structure is:

|   EmmetNPP.dll
|
\---EmmetNPP
    |   editor.js
    |   npp_emmet.py
    |   PyV8.py
    |   _PyV8.pyd
    |
    \---emmet
            context.py
            emmet-app.js
            file.py
            python-wrapper.js
            pyv8loader.py
            semver.py
            snippets.json
            __init__.py

The file __init__.py has a length of 0 bytes after unzipping but this is the same like in the ZIP file.

Snippets

The ZIP file of Snippets gets unzipped correctly now. Its directory structure is:

|   NppSnippets.dll
|
\---NppSnippets
        Languages.sql
        NppSnippets.sql
        Template.sqlite

With unpatched GUP.exe v5.0.4 the file Languages.sql had a length of 0 bytes after unzipping.

BookmarkManager

The ZIP file of BookmarkManager can be unzipped now but one file has a length of 0 bytes . Its directory structure is:

|   NppBookmarkManager.dll
|
+---images
|   \---NppBookmarkManager
|       \---Marker
|               1.png
|               2.png
|               3.png
|               4.png
|               5.png
|               6.png
|               7.png
|               8.png
|               9.png
|
\---NppBookmarkManager
        License.txt
        README.md

Even with patched GUP.exe v5.0.4 the file License.txt has a length of 0 bytes.

Final Notes

Even if the Snippets and BookmarkManager plugins ZIP files get unzipped correctly they have issues to find their companion files. The directories NppSnippets and images have to be moved to the old plugins directory under the Notepad++ installation directory. The Emmet plugin I have not tested for this issue.

@donho donho self-assigned this Dec 17, 2018

@donho

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

@chcg does this PR solve all the decompression issues we've found so far?

@dinkumoil

This comment has been minimized.

Copy link

commented Dec 17, 2018

@donho

According to my test results - no. See results for BookmarkManager plugin.

@chcg

This comment has been minimized.

Copy link
Author

commented Dec 18, 2018

@dinkumoil
That are also my observations, not all issues are fixed by this, but a first step forward.
@donho
I case you want to move away from the current zip code you may want to use the one from PM for quite some time without problems based on zlib 1.2.11 (https://github.com/madler/zlib/releases/tag/v1.2.11).
I would avoid switching from zip format to just 7z as we would loose again multiple plugins not maintained actively any more.

@donho

This comment has been minimized.

Copy link
Member

commented Dec 18, 2018

@chcg I believe the unzip bug in WinGup has been fixed (no more zero length unzipped file) :
https://notepad-plus-plus.org/temp/GUP_new.zip

Could you confirm me if it’s fixed?

@dinkumoil

This comment has been minimized.

Copy link

commented Dec 19, 2018

@donho

I have tested unzipping the following plugins:

Emmet, Snippets, Code Alignment, BookmarkManager

The first three worked fine. However, the BookmarkManager plugin could not be unzipped. Error message:

Can't unzip: Operation not permitted or decompression failed

I used a fresh v7.6.1 installation and replaced GUP.exe with the version from your link above.

I executed the following command line:

GUP.exe -unzipTo "C:\Program Files (x86)\Notepad++\notepad++.exe" "C:\tmp" "NppBookmarkManager https://bitbucket.org/ViRuSTriNiTy/nppbookmarkmanager/downloads/NppBookmarkManager_0_1_0_97_Unicode.zip 69e73ac848b0766d61b5d4082a119803d22acae094de1e573dc91e068e1d2863"

The same ZIP file can be unzipped with 7-ZIP and Windows Explorer without any problem.

@donho

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

@dinkumoil BookmarkManager cannot be find in the current plugin list.
Could you provid me the link to download it?

@dinkumoil

This comment has been minimized.

Copy link

commented Dec 19, 2018

@donho

You can pick the download link from the command line I provided in my comment above.

Furthermore there is the list of problematic plugins created by @chcg.

@donho

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

@donho donho closed this Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.