libzip icon indicating copy to clipboard operation
libzip copied to clipboard

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

Open nachiket273 opened this issue 2 years ago • 2 comments

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 avatar May 11 '23 09:05 nachiket273

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 avatar May 19 '23 10:05 0-wiz-0

Could be a same as #382. FILE_ATTRIBUTE_REPARSE_POINT

@nachiket273 could you try libzip <= 1.6.1

arsnyder16 avatar May 24 '23 12:05 arsnyder16

Feedback timeout.

dillof avatar Aug 21 '24 16:08 dillof