[physfs] physfs 2.1: PHYSFS_enumerateFiles (symlink related?)

Jonas Thiem jonasthiem at googlemail.com
Tue Apr 8 02:21:37 EDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm using Linux, I used the latest repository code at the time.

Regarding the trailing slashes, I confused them with the leading ones
I think. So yes, removing the trailing ones might fix it.

Regards,
Jonas Thiem

On 02/09/2014 10:56 PM, Martin Felis wrote:
> Hi,
> 
> @Jonas: which OS are you using? Also which physfs version? Very 
> strange that omitting the trailing slash does not fix it for you.
> 
> At least for the slash fix: It seems that
> cnumCallbackFilterSymLinks (near line 2241) does not properly trim
> the directory string. It only removes the starting slash, but not
> the trailing one. This results in a double slash in the path that
> is queried a few lines further down to
> 
> if (dh->funcs->stat(dh->opaque, path, &statbuf)) { ... }.
> 
> As this double slash path does not exist the result the body of the
> if statement does not get executed and no paths added to the
> directory enumeration.
> 
> Is there a policy on whether trailing slashes are allowed or not?
> 
> Cheers, Martin
> 
> On 08.02.2014 15:18, Jonas Thiem wrote:
>> Hi Martin,
>> 
>> I just tried this and PHYSFS_permitSymbolicLinks(1) resolves the 
>> issue for me as well. However, I don't have a trailing slash
>> even, it just doesn't work at all for me (no matter if trailing
>> slash or not) unless I permit symbolic links as you suggested.
>> 
>> I don't have any symbolic links I'm aware of though, it's just a
>>  regular zip file.
>> 
>> Thanks a lot for finding a work around!
>> 
>> Regards, Jonas Thiem
>> 
>> On 02/08/2014 11:48 AM, Martin Felis wrote:
>>> Hi there,
>> 
>>> (this might be related to the mail of Jonas Thiem 
>>> http://icculus.org/pipermail/physfs/2014-January/001130.html. 
>>> Unfortunately I could not reply to his thread as I joined the 
>>> mailinglist just recently)
>> 
>>> I am using latest mercurial version of physfs 2.1 and have a 
>>> problem with PHYSFS_enumerateFiles(). I do get empty results 
>>> when querying the contents of a zip archive.
>> 
>>> For an archive with the layout:
>> 
>>> file1.txt file2.txt somesubdir/subfile1.txt 
>>> somesubdir/subfile2.txt
>> 
>>> the call to
>> 
>>> PHYSFS_enumerateFiles ("/somesubdir/");
>> 
>>> returns an empty list.
>> 
>>> When either setting PHYSFS_permitSymbolicLinks(1) or omitting
>>> the trailing '/' yields the expected results.
>> 
>>> Is this intended?
>> 
>>> Cheers, Martin _______________________________________________
>>>  physfs mailing list physfs at icculus.org 
>>> http://icculus.org/mailman/listinfo/physfs
>> 
>> _______________________________________________ physfs mailing 
>> list physfs at icculus.org
>> http://icculus.org/mailman/listinfo/physfs
>> 
> 
> _______________________________________________ physfs mailing
> list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTQ5VpAAoJEBIDTbbx8YkewdUP/3ZDr6M9M3FN5tYnfc7HLz7C
OWrp/kjA+TL1VV6PwFQoyBPpKySut7u1svBmLMZzb8xO3lR2aS70MfW1KGCsrJPN
mOEjbwbjOFAqL8Nl4mvJAmTNcUtfuqq2LRqPycrtxAeQIZUeOK8bpCC6qoQ9JL0S
/5hEPjIwqla1+DkBOuLPIvRXshSHATMJn+1dZOyfP7vnbUTpRWxsIr4pwbJeSy4a
4OEz2ta5Ht/ZYUjKxMwM79MsTM4LHHakqgrmnBRazMWs23NHlo5UeVwdKzZJm9QI
G2nQ/IWXBAuRn0DftppiyRl5ob5lPko612fPk6P+f7Yb7g/uQZ6Y/9DSESIXNGG/
bD6eNCiae/Q4ypntLEt0ZSengC1yaBzaeZIw5tipdiNVieDbkUcwZhoizHnwdMAi
OaG4wEyTwD3F3KnjEhRPmw2KYokg0ozztWZM0b5LW794OXmwlOat+T/UkeiL5OPt
D54t3NzfPVeaRFYRCjOExXDLmrYZ64xAP4BTjT8QteaYTrr3pTdEIPe/rWmp04CD
2vgY4CPeBgQpHl5RbF6NI4PtKwvsZZaTzeGJpqOX6UsPNJMdvC8lHu/AiCPfaRzY
lAFkVN0gAdi2WFIM9FqEkvMO02pQaC5+yY0aMTymXx2gC8+c3+yeoqnJDLD+book
hdMHH0bF6gnX2cWoWsmw
=Fgnw
-----END PGP SIGNATURE-----


More information about the physfs mailing list