[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[52120] scummvm/trunk/common/fs.cpp (and r52121)

Max Horn max at quendi.de
Tue Aug 17 09:56:16 CEST 2010


Am 17.08.2010 um 03:46 schrieb peres:

> 
>> I need it for the following pseudocode:
>> 
>> archive->listMatchedMembers(list, "rooms/*");
>> foreach it in (list) {
>>   executeScript(it->getName() + "/default.lua");
>> }
> 
> 
> Assuming that a single pattern does the job, this is how your code should be written:
> 
> archive->listMatchingMembers(list, "rooms/*/default.lua");
> foreach it in (list) {
> 	executeScript->(it->getName());
> }
> 
> listMatchingMembers should match your GLOB pattern and find the files into the subdirectories, provided you created the archive with the correct depth.

This will work for e.g. a ZipArchive. However, this will currently *not* work when archive is an FSDir, because getName() will in each case return "default.lua". This is a bug we need to fix.

Beyond that, I also think our handling of file clashes is not quite right, as detailed in my previous email.

Bye,
Max



More information about the Scummvm-devel mailing list