From 55c6d66f61a96ba63cd8c141229843ad2ab42632 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 24 Nov 2020 03:01:06 +0000 Subject: CTAN sync 202011240301 --- graphics/asymptote/locate.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'graphics/asymptote/locate.cc') diff --git a/graphics/asymptote/locate.cc b/graphics/asymptote/locate.cc index bb34cbaaf3..d1c11a1f27 100644 --- a/graphics/asymptote/locate.cc +++ b/graphics/asymptote/locate.cc @@ -37,15 +37,15 @@ bool exists(string filename) file_list_t searchPath; // Returns list of possible filenames, accounting for extensions. -file_list_t mungeFileName(string id) +file_list_t mungeFileName(string id, string suffix) { string ext = fs::extension(id); file_list_t files; - if (ext == "."+settings::suffix) { + if (ext == "."+suffix) { files.push_back(id); - files.push_back(id+"."+settings::suffix); + files.push_back(id+"."+suffix); } else { - files.push_back(id+"."+settings::suffix); + files.push_back(id+"."+suffix); files.push_back(id); } return files; @@ -62,10 +62,10 @@ string join(string dir, string file, bool full) // Find the appropriate file, first looking in the local directory, then the // directory given in settings, and finally the global system directory. -string locateFile(string id, bool full) +string locateFile(string id, bool full, string suffix) { if(id.empty()) return ""; - file_list_t filenames = mungeFileName(id); + file_list_t filenames = mungeFileName(id,suffix); for (file_list_t::iterator leaf = filenames.begin(); leaf != filenames.end(); ++leaf) { -- cgit v1.2.3