mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
Ignore directories when loading level metadata
Otherwise, this would produce a superfluous warning message in the console. Directories are now ignored and never attempted to be opened; so now any warning messages printed out are genuine file that something has genuinely gone wrong with. Well, there's still a warning message printed if there's a symlink to a directory; this is rarer, but it's still a false positive.
This commit is contained in:
parent
838ffbe68f
commit
6efed0740b
1 changed files with 10 additions and 0 deletions
|
@ -79,6 +79,11 @@ static bool compare_nocase (std::string first, std::string second)
|
|||
|
||||
static void levelZipCallback(const char* filename)
|
||||
{
|
||||
if (!FILESYSTEM_isFile(filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (endsWith(filename, ".zip"))
|
||||
{
|
||||
FILESYSTEM_loadZip(filename);
|
||||
|
@ -201,6 +206,11 @@ static void levelMetaDataCallback(const char* filename)
|
|||
LevelMetaData temp;
|
||||
std::string filename_ = filename;
|
||||
|
||||
if (!FILESYSTEM_isFile(filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ed.getLevelMetaData(filename_, temp))
|
||||
{
|
||||
ed.ListOfMetaData.push_back(temp);
|
||||
|
|
Loading…
Reference in a new issue