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

ZipExtractor fails with System.UnauthorizedAccessException if the Files it is trying to replace are hidden #601

Closed
PeterStrick opened this issue Feb 8, 2023 · 8 comments

Comments

@PeterStrick
Copy link

ZipExtractor fails with System.UnauthorizedAccessException if the Files it is trying to replace are marked as hidden.

This was re-produced on a Fresh Installation of Windows 11 21H2, no Antivirus or any other 3rd Party Software is installed.

The Application that was using AutoUpdater.Net is stored on a FAT32 USB-Stick, so this isn't a Permission issue.

Downloading the ZIP File, Getting the XML File and displaying the Changelog worked flawlessly without problems.

ZipExtractor extracts the ZIP File without problems if the Hidden attribute has been removed from all Files it is trying to replace.

Screenshot 2023-02-08 100102

image

@ravibpatel
Copy link
Owner

This should be fixed in latest commit. Can you try it out from here?

@PeterStrick
Copy link
Author

This should be fixed in latest commit. Can you try it out from here?

A different Error occurs now after using the DLL from the Zip File:
image

Roughly Translates to: This Datastream from ZipArchiveEntry does not support Write Operations

@ravibpatel
Copy link
Owner

Which application are you using to create the zip file?

@PeterStrick
Copy link
Author

Which application are you using to create the zip file?

Just Windows Explorer. Creating it with the Send To Shortcut

@ravibpatel
Copy link
Owner

I made some changes. Can you please try it again from here?

@PeterStrick
Copy link
Author

After using the new DLL the Error Message went away and it extracted successfully.

Just to make sure I modified the Appx.zip file on my local system by adding files to it and ran an Update (Just changed the Versions in Visual Studio to an older Version)

The Zip File and main EXE were replaced by the Versions within the Update Zip File, while even leaving the Hidden Attributes intact so I would say everything works with this Version now

@PeterStrick
Copy link
Author

After using the new DLL the Error Message went away and it extracted successfully.

Just to make sure I modified the Appx.zip file on my local system by adding files to it and ran an Update (Just changed the Versions in Visual Studio to an older Version)

The Zip File and main EXE were replaced by the Versions within the Update Zip File, while even leaving the Hidden Attributes intact so I would say everything works with this Version now

Is this change in the normal AutoUpdater.Net Version?

@ravibpatel
Copy link
Owner

I tagged the latest commit, so it will be available on NuGet soon.

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

2 participants