-
Notifications
You must be signed in to change notification settings - Fork 267
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
zip_open fails with symbolic link on Windows #382
Comments
We have no Windows expertise. |
No, I don't think he is. |
@0-wiz-0 @arsnyder16 Thanks for the feedback!
I removed I also found that one way to workaround this issue is to call |
In your testing, please also try changing the file and report back if the symlinks is overwritten with a file, or the symlink target is replaced instead. |
@0-wiz-0 Would you like to know how updating the file via symlink works on Windows in general or how libzip updates the file? If it's the former, I tried notepad and ms word, and the target of the symlink is updated not the symlink file itself. If the latter, my workaround seems to open the archive in readonly mode so my attempt of updating and overwriting the file did not do the trick. |
@0-wiz-0 I have a good news to share 😄 Spent some time trying to make With We can instead first get the file handle by calling
With this change, I can read the contents (testing with The write, however, replaces the symlink file itself. This seems because libzip calls |
That's good progress. |
Describe the Bug
On Windows, zip_open fails when a path to a symbolic link is given, which points to a zip file.
Expected Behavior
zip_open opens the .zip file referenced by the symbolic link
Observed Behavior
zip_open fails with error code 28 (ZIP_ER_OPNOTSUPP).
To Reproduce
To create a symbolic link on Windows, 1) open command prompt with Admin privilege, 2) run "mklink <name> <target>"
libzip Version
v1.7.0 and newer
Operating System
Windows
Test Files
Any zip file.
Additional context
Not sure if this is supposed to work or not, but I see it worked up until version 1.6.1.
On version 1.7.3, the returned error code is 19 (ZIP_ER_NOZIP) instead.
The text was updated successfully, but these errors were encountered: