I started learning libzip today everything is going great, it's just that I can't get the zip_name_locate to work and I can't find any tutorials/examples/documentation that explains it(well the documentation does but I can't get it to work). Documentation 1, Documentation 2 ( I can't get any of these to work, the Documentation 2 page also has some enums that apparently haven't been declared in my scope)
So first, my zip archive opens correctly as I can replace and add files to it. I've got terminal output that shows the paths of the indexes (from the zip_get_name function).
Number of files in archive: 3
dummy/
dummy/dummy1/
dummy/dummy1/dummytxt
No matter which one of these I try to find the index of, I always get the index of "dummy/" which is 0, I've also tried with all different enums (ZIP_FL_COMPRESSED, ZIP_FL_ENCRYPTED, ZIP_FL_NOCASE, ZIP_FL_NODIR, ZIP_FL_RECOMPRESS, ZIP_FL_UNCHANGED and 0).
(This "dummy/dummy1/" returns 0, which according to zip_get_name is "dummy/")
I would be very grateful for any help.