summaryrefslogtreecommitdiff
path: root/graphics/asymptote/locate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/locate.cc')
-rw-r--r--graphics/asymptote/locate.cc12
1 files changed, 6 insertions, 6 deletions
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) {