diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-23 19:49:46 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-23 19:49:46 +0000 |
commit | bc3e1a212250a67e53e86c972287a275834a967a (patch) | |
tree | ab4dabcae546687d098d94443a7694611e8da7fd /libs/ardour/template_utils.cc | |
parent | 4c224ef9558b0d555cad533dfe276c8f6dbd7bde (diff) |
fix failure to find route templates
git-svn-id: svn://localhost/ardour2/branches/3.0@11319 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/template_utils.cc')
-rw-r--r-- | libs/ardour/template_utils.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 825a24d3e1..388e09fab1 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -75,6 +75,16 @@ template_filter (const string &str, void */*arg*/) return true; } +static bool +route_template_filter (const string &str, void */*arg*/) +{ + if (str.find (template_suffix) == str.length() - strlen (template_suffix)) { + return true; + } + + return false; +} + string session_template_dir_to_file (string const & dir) { @@ -130,7 +140,7 @@ find_route_templates (vector<TemplateInfo>& template_names) SearchPath spath (system_route_template_directory()); spath += user_route_template_directory (); - templates = scanner (spath.to_string(), template_filter, 0, false, true); + templates = scanner (spath.to_string(), route_template_filter, 0, false, true); if (!templates) { return; |