From ivansafrin at gmail.com Sat May 11 18:11:53 2013 From: ivansafrin at gmail.com (Ivan Safrin) Date: Sat, 11 May 2013 18:11:53 -0400 Subject: [physfs] Physfs not seeing a file in zip archive Message-ID: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> Hello! I am the lead developer of Polycode, which uses PhysFS fairly heavily (thank you so much for your work on PhysFS, it's an amazing project!). We've encountered a strange issue of a file not being found by PhysFS within a zip archive. It occurs only when it's created with polycode's build tool, which uses the minizip library for creating the zip archive (when I use my Mac's Compress function to create the zip, the file can be seen by PhysFS correctly). The strange thing is it happens very inconsistently, with the order or even amounts of other files in the archive impacting whether this file can be seen or not (with all other files reading properly). I can unzip the file correctly using most unzip tools and it seems that PhysFS is the only one that has a problem seeing the file. I stepped through PHYSFS_exists and it seems that it indeed fails in zip_find_entry not finding the entry for said file. Since PhysFS has no problem seeing the file in a zip file created by an "official" zip tool, I am assuming that the issue is most likely with my not setting proper flags while adding files to the archive, not with PhysFS itself, but since other tools don't seem to have a problem unzipping the file, I'm wondering if anyone has encountered a similar problem before. Thank you! - Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sik.the.hedgehog at gmail.com Sat May 11 19:55:15 2013 From: sik.the.hedgehog at gmail.com (Sik the hedgehog) Date: Sat, 11 May 2013 20:55:15 -0300 Subject: [physfs] Physfs not seeing a file in zip archive In-Reply-To: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> References: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> Message-ID: If everything else can see it and only PhysicsFS can't, I'd say it's most likely a PhysicsFS bug and you're probably hitting a corner case. Can you provide a ZIP file that shows this issue? 2013/5/11, Ivan Safrin : > Hello! > > I am the lead developer of Polycode, which uses PhysFS fairly heavily (thank > you so much for your work on PhysFS, it's an amazing project!). > > We've encountered a strange issue of a file not being found by PhysFS within > a zip archive. It occurs only when it's created with polycode's build tool, > which uses the minizip library for creating the zip archive (when I use my > Mac's Compress function to create the zip, the file can be seen by PhysFS > correctly). > > The strange thing is it happens very inconsistently, with the order or even > amounts of other files in the archive impacting whether this file can be > seen or not (with all other files reading properly). I can unzip the file > correctly using most unzip tools and it seems that PhysFS is the only one > that has a problem seeing the file. > > I stepped through PHYSFS_exists and it seems that it indeed fails in > zip_find_entry not finding the entry for said file. > > Since PhysFS has no problem seeing the file in a zip file created by an > "official" zip tool, I am assuming that the issue is most likely with my not > setting proper flags while adding files to the archive, not with PhysFS > itself, but since other tools don't seem to have a problem unzipping the > file, I'm wondering if anyone has encountered a similar problem before. > > Thank you! > > - Ivan > > > From ivansafrin at gmail.com Sat May 11 20:03:25 2013 From: ivansafrin at gmail.com (Ivan Safrin) Date: Sat, 11 May 2013 20:03:25 -0400 Subject: [physfs] Physfs not seeing a file in zip archive In-Reply-To: References: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> Message-ID: You can find the file here: https://dl.dropboxusercontent.com/u/4011871/test2.zip And here's the testing code for it (it sees the first file, but not the second while both are in the archive): #include #include int main(int argc, char **argv) { PHYSFS_init(NULL); PHYSFS_addToSearchPath("test2.zip", 1); if(PHYSFS_exists("src/engine/components/Health.lua")) { printf("YES\n"); } else { printf("NO\n"); } if(PHYSFS_exists("src/engine/entities/PlayerChar.lua")) { printf("YES\n"); } else { printf("NO\n"); } } On Sat, May 11, 2013 at 7:55 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote: > If everything else can see it and only PhysicsFS can't, I'd say it's > most likely a PhysicsFS bug and you're probably hitting a corner case. > Can you provide a ZIP file that shows this issue? > > 2013/5/11, Ivan Safrin : > > Hello! > > > > I am the lead developer of Polycode, which uses PhysFS fairly heavily > (thank > > you so much for your work on PhysFS, it's an amazing project!). > > > > We've encountered a strange issue of a file not being found by PhysFS > within > > a zip archive. It occurs only when it's created with polycode's build > tool, > > which uses the minizip library for creating the zip archive (when I use > my > > Mac's Compress function to create the zip, the file can be seen by PhysFS > > correctly). > > > > The strange thing is it happens very inconsistently, with the order or > even > > amounts of other files in the archive impacting whether this file can be > > seen or not (with all other files reading properly). I can unzip the file > > correctly using most unzip tools and it seems that PhysFS is the only one > > that has a problem seeing the file. > > > > I stepped through PHYSFS_exists and it seems that it indeed fails in > > zip_find_entry not finding the entry for said file. > > > > Since PhysFS has no problem seeing the file in a zip file created by an > > "official" zip tool, I am assuming that the issue is most likely with my > not > > setting proper flags while adding files to the archive, not with PhysFS > > itself, but since other tools don't seem to have a problem unzipping the > > file, I'm wondering if anyone has encountered a similar problem before. > > > > Thank you! > > > > - Ivan > > > > > > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icculus at icculus.org Sat May 11 22:45:33 2013 From: icculus at icculus.org (Ryan C. Gordon) Date: Sat, 11 May 2013 22:45:33 -0400 Subject: [physfs] Physfs not seeing a file in zip archive In-Reply-To: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> References: <8993B715FFD64AD8B4B691A58BD608BF@gmail.com> Message-ID: <518F024D.6020804@icculus.org> > I stepped through PHYSFS_exists and it seems that it indeed fails in > zip_find_entry not finding the entry for said file. Oh, man, I thought we had this fixed. I'll take a look. --ryan.