I am pushing files to an archive using libzip / c++ and so far so good. I can open the created archive with the WinRar Windows client, unpack the archive and read every file without a problem.
But when attempting to read some files (the ones in subfolders for some reason) from the archive with c++ / libzip, it seems libzip just can't locate them and my returned zip_file
struct is NULL
. I am 100% sure the paths to those files are correct.
Fun fact : if I unpack the created archive manually and manually repack it with the WinRar client, I have then no problem reading the archive with libzip.
I tried getting info on the error here with this code :
if (isNull(zf)) { // zf is of type - struct zip_file* -
zip_error_t ze;
zip_error_init(&ze);
zip_error_code_system(&ze);
zip_error_code_zip(&ze);
const char* err = zip_error_strerror(&ze);
...
}
No error codes are registered and the err
message is No error.
What is going on here ?