1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 21:29:43 +02:00

If a filename contains '#' don't check if the file exists.

This commit is contained in:
Paul Cercueil 2012-10-07 20:08:25 +02:00
parent 0cbb5ee09a
commit e3837fce68

View File

@ -110,7 +110,10 @@ Surface *SurfaceCollection::add(const string &path) {
filePath = getSkinFilePath(filePath.substr(5,filePath.length()));
if (filePath.empty())
return NULL;
} else if (!fileExists(filePath)) return NULL;
} else if ((filePath.find('#') == filePath.npos) && (!fileExists(filePath))) {
WARNING("Unable to add image %s\n", path.c_str());
return NULL;
}
DEBUG("Adding surface: '%s'\n", path.c_str());
Surface *s = Surface::loadImage(filePath);