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

Error when extracting zip file #339

Open
LulzRose opened this issue Jun 27, 2023 · 5 comments
Open

Error when extracting zip file #339

LulzRose opened this issue Jun 27, 2023 · 5 comments

Comments

@LulzRose
Copy link

When using context menu extract the message Cannot find archive name is displayed. When 7zip is opened, it can be extracted without issue.

@WAUthethird
Copy link

Would be awesome to get a fix, this is the main way I use 7zip.

@TouchfuzzyGH
Copy link

Having the same issue too.

@DerekZiemba
Copy link

DerekZiemba commented Aug 22, 2023

Also have the issue. Worked fine on v22.01-v1.5.5-R2 & broke after updating to v22.01-v1.5.5-R3.

Downgrade by running the old 7z22.01-zstd-x64.exe installer from v22.01-v1.5.5-R2 directly over the R3 installation fixed it.

Here's what it does

Video.mp4

@sebres
Copy link
Collaborator

sebres commented Sep 11, 2023

I am sure the issue is not the version, but the inconsistency after upgrade (library for integration in file explorer didn't update therefore doesn't match new 7z.dll)...
Basically same issue than #313 (comment).

Thus can be closed as duplicate...
I have no idea whether and in which cases MSI installer may not correctly upgrade everything, even after reboot. Or whether it is a bug of install-script. I'll take a closer look later.

@sebres
Copy link
Collaborator

sebres commented Sep 12, 2023

Hmm... The issue (with not renaming .tmp by install) may happen here:

if (!MoveFileExW(path, origPath, MOVEFILE_DELAY_UNTIL_REBOOT | MOVEFILE_REPLACE_EXISTING))

Just I still don't follow why - since it seems to add the operation to HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations properly and the reason why it'd fail at start would be only access denied (why?) or some similar circumstances.
How it will be installed? Hopefully as admin or with UAC elevation?

Current algorithm looks like:

  1. try to open file to write in-place (with original name)
  2. write file with current name (original or tmp)
  3. if it failed, try to find unused .tmp name (with some hex inside, up to 100 times) and repeat
  4. if it success stop and when that was tmp-file, register pending rename with MoveFileExW

No idea why it doesn't work, so the only attempt to "repair" I can imagine at the moment would be something like this:
try to rename current non-writable file to .tmp (if library is used, it is mostly not writable, but normally can be renamed) and then if it is successful, to write the file with original name without a necessity to rename it back with MoveFileExW later.
And then register pending delete for that tmp-file (also with MoveFileExW).
In the case MoveFileExW would fail for some reason, the new DLL has already correct name and possibly only tmp-file remains as a small leak in the 7z-install folder.

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

5 participants