[physfs] PHYSFS_enumerateFiles does not work for me, returns "not found" for existing directory

Jonas Thiem jonasthiem at googlemail.com
Fri Jun 7 05:37:08 EDT 2013


Hi,

I have run into a problem with PHYSFS_enumerateFiles. I can mount and
use my .zip archive just fine, open files for reading etc., but
PHYSFS_enumerateFiles for the directories just won't work.

My engine mounts .zip files to a random mount point, in this
particular case it was "0553672966062338366". This is the engine
output:
bash-4.2$ ./ethaveon-native
isdirectory: 0: 0553672966062338366/game.lua
isdirectory: 1: 0553672966062338366/templates
isdirectory: 1: 0553672966062338366/templates
isdirectory: 0: 0553672966062338366/templates/init.lua
isdirectory: 0: 0553672966062338366/templates/init.lua
template init...
isdirectory: 1: 0553672966062338366/templates
Virtual dir templates/ found.
previously: PHYSFS_getLastError(): (null)
now calling PHYSFS_enumerateFiles("0553672966062338366/templates")
afterwards: PHYSFS_getLastError(): not found
got file list for 0553672966062338366/templates. entry filelist[0]:
(null)

As you can see, it used PHYSFS's stat to correctly identify
"0553672966062338366/templates" as a folder. Also it identified
various files (and opening them for reading actually works, I have
tried). But a call to
PHYSFS_enumerateFiles("0553672966062338366/templates") unexpectedly
causes a "not found" error, and the returned list has NULL as first
entry.

Does anyone have an idea? I'm using the most current dev code from hg
because I depend on the newly introduced callback-based I/O. Any help
would be appreciated!

Regards,
Jonas Thiem



More information about the physfs mailing list