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

zip_open fails to open zip using UNC(\\server\folder\file.zip) path. #381

Open
nachiket273 opened this issue May 11, 2023 · 2 comments
Open
Labels
bug libzip doesn't behave as expected. feedback Waiting for feedback from submitter. help wanted

Comments

@nachiket273
Copy link

I have one CIFS share accessible from my windows machine. The share contains a zip file. Path to this zip file (\server_ip\share\file.zip) is read from database and used in zip_open.

int err = 0;
zip_t *myzip = zip_open("\\server_ip\share\file.zip",  ZIP_RDONLY,  &err);

zip_open fails for the UNC path, but the same code works well when I use local filesystem path (D:\folder\file.zip). I have verified that share has enough space and all the required permissions.

@nachiket273 nachiket273 added the bug libzip doesn't behave as expected. label May 11, 2023
@0-wiz-0
Copy link
Member

0-wiz-0 commented May 19, 2023

We have no Windows expertise, so help is welcome.
Reading https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation my guess is that your file name is too long. There is a magical prefix you can add to the file name to increate this.
What is the actual error you see?

@0-wiz-0 0-wiz-0 added the feedback Waiting for feedback from submitter. label May 19, 2023
@arsnyder16
Copy link

Could be a same as #382. FILE_ATTRIBUTE_REPARSE_POINT

@nachiket273 could you try libzip <= 1.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug libzip doesn't behave as expected. feedback Waiting for feedback from submitter. help wanted
Projects
None yet
Development

No branches or pull requests

4 participants