summaryrefslogtreecommitdiff
path: root/libs/ardour/template_utils.cc
diff options
context:
space:
mode:
authorJohannes Mueller <github@johannes-mueller.org>2017-07-03 00:27:18 +0200
committerRobin Gareus <robin@gareus.org>2017-07-12 16:15:03 +0200
commiteb79ae7d415294789fa9056511ae27215449bfe3 (patch)
treee3f70e51af452de90c94c81bdce1e61a314746b7 /libs/ardour/template_utils.cc
parentb1cf27bed419d7aba91cb9e3d7ff96afc18ef5d0 (diff)
Don't try to chop of the file name extension from a template dir
Template files reside in .config/ardour5/templates/$(template_name)/$(template_name).template We run through .config/ardour5/templates/ and find there the names of the directories the .template-files are located in. These directory names don't have a .template extension. So we shouldn't try to chop the non existing extension of, because then we only modify template names with a '.' in them.
Diffstat (limited to 'libs/ardour/template_utils.cc')
-rw-r--r--libs/ardour/template_utils.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc
index b2fa703060..81a7f31078 100644
--- a/libs/ardour/template_utils.cc
+++ b/libs/ardour/template_utils.cc
@@ -22,7 +22,6 @@
#include <glibmm.h>
-#include "pbd/basename.h"
#include "pbd/file_utils.h"
#include "pbd/stl_delete.h"
#include "pbd/xml++.h"
@@ -104,7 +103,7 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml)
TemplateInfo rti;
- rti.name = basename_nosuffix (*i);
+ rti.name = Glib::path_get_basename (*i);
rti.path = *i;
template_names.push_back (rti);