From e3837fce6806fcfbff3a613fbd065e83798218df Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sun, 7 Oct 2012 20:08:25 +0200 Subject: [PATCH] If a filename contains '#' don't check if the file exists. --- src/surfacecollection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/surfacecollection.cpp b/src/surfacecollection.cpp index 60f7ec1..eedb1b7 100644 --- a/src/surfacecollection.cpp +++ b/src/surfacecollection.cpp @@ -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);