]> git.sesse.net Git - nageru/commitdiff
Make search_for_file() understand absolute paths.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Apr 2017 16:58:28 +0000 (18:58 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Apr 2017 16:58:36 +0000 (18:58 +0200)
image_input.cpp

index 92c58eca1956bfa595f6d04ba84b0157057b1b8c..e763ad599d7d7695dbfe7d788c8ba40a06d58eb1 100644 (file)
@@ -39,6 +39,11 @@ using namespace std;
 
 string search_for_file(const string &filename)
 {
+       if (!filename.empty() && filename[0] == '/') {
+               // Absolute path.
+               return filename;
+       }
+
        // Look for the file in all theme_dirs until we find one;
        // that will be the permanent resolution of this file, whether
        // it is actually valid or not.