mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-27 00:47:43 +01:00
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.
This commit is contained in:
parent
bb2cb9f01d
commit
edd95566fd
1 changed files with 2 additions and 3 deletions
|
|
@ -3914,7 +3914,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) {
|
||||
|
||||
|
|
@ -3926,7 +3925,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;
|
||||
}
|
||||
|
|
@ -3948,7 +3947,7 @@ Session::audio_source_name_is_unique (const string& name, uint32_t chan)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (existing == 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue