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

Fixes string quotation in cmd-line from UI #313

Closed
wants to merge 3 commits into from

Conversation

sebres
Copy link
Contributor

@sebres sebres commented Apr 6, 2023

This should fix #312 for new command-line parser algorithm (#307, #310).

Proposed PR:

I did not test it from explorer integration (didn't install/register it yet), so would be nice if someone could test it...
Only tested from compiled 7zFM.exe, for instance from its context menu where previously (without that fix) it failed with same error like in #312.
Test and review are welcome.

@sebres
Copy link
Contributor Author

sebres commented Apr 6, 2023

Although it'd probably expect another amend - a different version of GetQuotedString if gets compiled not for windows target.
@mcmilk Do you know which targets this basically allows (with and without UI)?

@akuropka
Copy link

akuropka commented Apr 7, 2023

Tested this build and error is sadly still the same.

@sebres
Copy link
Contributor Author

sebres commented Apr 7, 2023

Thx for feedback!
How and what exactly (which action, from where, explorer or 7zFM) did you test?

@akuropka
Copy link

akuropka commented Apr 7, 2023

It's about the shell context menu and only immediate extracting options do not work.

I made a screencast maybe that helps for better understanding:
https://user-images.githubusercontent.com/22570574/230623533-29bad325-3426-4997-8ebd-b96f249c6500.mp4

@sebres
Copy link
Contributor Author

sebres commented Apr 7, 2023

The question is whether you reinstalled or reregistered the shell integration with newest build version too? Because otherwise, previous version, is incompatible to new 7z executables.
But OK, I'll try to find the issue further.

@akuropka
Copy link

akuropka commented Apr 7, 2023

I just ran the setup and rebooted for safety’s sake. I can’t tell if the installer reinstalls or re-registers the shell integration. However, handling is done by 7zip.dll which should be corresponding.

Anyways, I removed the context menu and added it again through Options but the problem remains.

@sebres
Copy link
Contributor Author

sebres commented Apr 11, 2023

Hmm... I can't reproduce the error.
Downloaded 7-Zip ZS Release binaries (artifact of that build), installed 7z22.01-zstd-x64.exe from there in Windows 10 VM - every action from explorer context menu succeeds without any issue.

@akuropka Are you really sure it is the newest version of 7-zip.dll installed / integrated in explorer?
May be just some issue of update/install process.

What do you see in the registry and file system for the 7-zip.dll (modification date, hash)?

> reg QUERY "HKCR\*\shellex\ContextMenuHandlers\7-Zip-Zstandard"

HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\7-Zip-Zstandard
    (Default)    REG_SZ    {23170F69-20BB-278A-1000-000100020000}

> reg QUERY "HKCR\CLSID\{23170F69-20BB-278A-1000-000100020000}\InprocServer32"

HKEY_CLASSES_ROOT\CLSID\{23170F69-20BB-278A-1000-000100020000}\InprocServer32
    (Default)    REG_SZ    C:\Program Files\7-Zip-Zstandard\7-zip.dll
    ThreadingModel    REG_SZ    Apartment

> dir "C:\Program Files\7-Zip-Zstandard\7-zip.dll"

 Directory of C:\Program Files\7-Zip-Zstandard

06.04.2023  20:36           187.904 7-zip.dll
               1 File(s)        187.904 bytes
               0 Dir(s)  21.404.016.640 bytes free

> "C:\Program Files\7-Zip-Zstandard\7z" h -scrcsha256 "C:\Program Files\7-Zip-Zstandard\7-zip.dll"
...
Size: 187904

SHA256 for data:              308e2b0b4739b49ef03127b92421c8b946cec17f0dd45645e33363b12c67986f

DLL from latest releases would have different timestamp (modified 05.04.2023) and SHA256 hash.

@akuropka
Copy link

Actually I was never sure if 7-zip.dll was up to date since I didn't check in detail. Turns out the new dll was copied as 7-zip.dll.tmp in the folder and remained like that after reboot keeping the old one in place... sorry!
I can confirm it works with your PR.

@mcmilk
Copy link
Owner

mcmilk commented Apr 14, 2023

Merged by hand - thanks a lot @sebres

@mcmilk mcmilk closed this Apr 14, 2023
@sebres sebres deleted the fix-gh-312--quotedstring-from-ui branch April 18, 2023 14:32
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

Successfully merging this pull request may close these issues.

"Cannot find archive name" error while trying to extract through context menu
3 participants