Commit ef6296a5 authored by cutealien's avatar cutealien

CFileSystem::removeFileArchive now checking for normalized path + corresponding test now evaluated.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4136 dfc29bdd-3216-0410-991c-e03cc46cb475
parent fb49e30c
Changes in 1.8 (??.??.2011) Changes in 1.8 (??.??.2011)
- CFileSystem::removeFileArchive now checking for normalized path
- Fix zip's with passwords on 64-bit systems (thx @ Dr. Gladman for writing the bugfix)
- replace asserts in tests with macro assert_log to allow running all tests through on problems. - replace asserts in tests with macro assert_log to allow running all tests through on problems.
- added IGUIElement::setName and IGUIElement::getName (similar to ISceneNode) - added IGUIElement::setName and IGUIElement::getName (similar to ISceneNode)
......
...@@ -458,9 +458,10 @@ bool CFileSystem::removeFileArchive(u32 index) ...@@ -458,9 +458,10 @@ bool CFileSystem::removeFileArchive(u32 index)
//! removes an archive from the file system. //! removes an archive from the file system.
bool CFileSystem::removeFileArchive(const io::path& filename) bool CFileSystem::removeFileArchive(const io::path& filename)
{ {
const path absPath = getAbsolutePath(filename);
for (u32 i=0; i < FileArchives.size(); ++i) for (u32 i=0; i < FileArchives.size(); ++i)
{ {
if (filename == FileArchives[i]->getFileList()->getPath()) if (absPath == FileArchives[i]->getFileList()->getPath())
return removeFileArchive(i); return removeFileArchive(i);
} }
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
......
...@@ -458,7 +458,7 @@ bool archiveReader() ...@@ -458,7 +458,7 @@ bool archiveReader()
// logTestString("Testing complex mount file.\n"); // logTestString("Testing complex mount file.\n");
// ret &= testMountFile(fs); // ret &= testMountFile(fs);
logTestString("Testing add/remove with filenames.\n"); logTestString("Testing add/remove with filenames.\n");
testAddRemove(fs, "media/file_with_path.zip"); ret &= testAddRemove(fs, "media/file_with_path.zip");
device->closeDevice(); device->closeDevice();
device->run(); device->run();
......
Tests finished. 1 test of 1 passed. Tests finished. 1 test of 1 passed.
Compiled as RELEASE Compiled as DEBUG
Test suite pass at GMT Tue Apr 3 20:04:39 2012 Test suite pass at GMT Mon Apr 16 16:38:07 2012
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment