getFileList / removeFileArchive

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

getFileList / removeFileArchive

Post by stefbuet »

This is not really a bug but here is the problem :

You have an archive "myARCHIVE.zip" (note cap letters)
You can load it with no caps letters, but you won't be able to unload it later with cap letters :

Code: Select all

 
fs->addFileArchive("myARCHIVE.zip"); //ok
fs->removeFileArchive("myARCHIVE.zip"); //ok
//ok
 
fs->addFileArchive("myarchive.zip"); //ok
fs->removeFileArchive("myARCHIVE.zip"); //fail
//fail
 
fs->addFileArchive("myarchive.zip");//ok
fs->removeFileArchive("myarchive.zip"); //ok
//ok
 
I'm using fs->createFileList to get filenames of some archives to be loaded. Filenames created in the filelist are all lowered letters, so no more cap letters. However I was using real filenames with caps letters to try to remove archives, but it failed as the previous code explains it.
CuteAlien wrote:coders are well-known creatures of the night
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Re: getFileList / removeFileArchive

Post by bitplane »

I guess it's because the VFS doesn't know if the real filesystem is case insensitive or not. It's certainly a real bug though, specially on Linux, OSX and mobile devices.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply