From 960b096ad2763e4296b9392e634bb6ab4896032f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 12 Apr 2017 18:58:28 +0200 Subject: [PATCH] Make search_for_file() understand absolute paths. --- image_input.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/image_input.cpp b/image_input.cpp index 92c58ec..e763ad5 100644 --- a/image_input.cpp +++ b/image_input.cpp @@ -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. -- 2.39.2