summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-07-10 08:16:27 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-07-10 08:16:27 -0400
commit94c8b672c4e294384348f405d179f13e33e72ee5 (patch)
tree6e651892a7f15db7b2ccc77aa9ba85e0c5e0fa45 /libs/ardour/session.cc
parent15fa465013a2d01bcd9fbb958b02a8f818d40edc (diff)
do not call basename_nosuffix() before using matching_unsuffixed_filename_exists_in() because the latter does that call itself.
As the code used to be, if we are testing for a candidate filename of aaa.bbb.ccc, the call strips .ccc and matching_... strips .bbb resulting in a match with aaa, which is not intended at all.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index f7dfbd6cbc..b7b5667d06 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3509,7 +3509,6 @@ Session::audio_source_name_is_unique (const string& name, uint32_t chan)
std::vector<string> sdirs = source_search_path (DataType::AUDIO);
vector<space_and_path>::iterator i;
uint32_t existing = 0;
- string basename = PBD::basename_nosuffix (name);
for (vector<string>::const_iterator i = sdirs.begin(); i != sdirs.end(); ++i) {
@@ -3521,7 +3520,7 @@ Session::audio_source_name_is_unique (const string& name, uint32_t chan)
const string spath = *i;
- if (matching_unsuffixed_filename_exists_in (spath, basename)) {
+ if (matching_unsuffixed_filename_exists_in (spath, name)) {
existing++;
break;
}
@@ -3543,7 +3542,7 @@ Session::audio_source_name_is_unique (const string& name, uint32_t chan)
break;
}
}
-
+
return (existing == 0);
}