I am looking to update a small number of files in a zip (125 out of some 10000, specifically). I've been messing around with this library, checking discussions on here, and reading the documentation and cannot for the life of me get this to work how
id like. Heres the closest that I've come:
foreach (string file in Directory.GetFiles(path, "*.inibin", SearchOption.AllDirectories))
string relativePath = file.Substring(subPath.Length);
relativePath = relativePath.Substring(0, relativePath.LastIndexOf(@"\"));
My directory structure (and zip file structure) are as follows :
or as an example:
My goal is to update all of the *.inibin files in the Data\Characters subdirectories. In the above code, i set the relativePath variable to be "DATA\Characters\<NAME>". When i save the Zip, i end up with TWO <NAME>.inibin
files in each folder. I don't even understand how that makes sense. They are placed in the right folder with the above code, but the existing file in the archive is not updated, it seems to be duplicated. When I extracted this file, I was
prompted with a file replace as well (I guess the newer file replaces the older on extraction?).
I've been making similar attempts (see:failures) with the UpdateEntry method, as this is the method that I think I will ideally want to use. Most alarmingly, when trying to use RemoveEntry with "DATA\Characters\<NAME>\<NAME>.inibin"
(which is the appropriate filename that I can see when debugging), I get an exception.
Am I missing something? Is there something that I've been doing blatantly wrong? I hope I didn't make too detailed of a post!