forked from mirrors/0ad
vfs_lookup: fix bug when creating physical directories via VFS
CollageManager: avoid creating zero-length files to avoid VFS compaints test_MeshManager.h now runs correctly without errors/asserts XMLUtils.cpp: bugfix (pointed out by Philip) This was SVN commit r5855.
This commit is contained in:
@@ -121,7 +121,11 @@ public:
|
||||
case CColladaManager::PSA: convert_dae_to_psa(daeData.c_str(), ColladaOutput, &writeBuffer); break;
|
||||
}
|
||||
|
||||
g_VFS->CreateFile(pmdFilename, writeBuffer.Data(), writeBuffer.Size());
|
||||
// don't create zero-length files (as happens in test_invalid_dae when
|
||||
// we deliberately pass invalid XML data) because the VFS caching
|
||||
// logic warns when asked to load such.
|
||||
if(writeBuffer.Size())
|
||||
g_VFS->CreateFile(pmdFilename, writeBuffer.Data(), writeBuffer.Size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user