summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-03-08 23:22:01 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-08 23:22:01 +0100
commit1a3bf8411529e2d6c21244b970c3e5d962396cce (patch)
treefa50bd229d53c002686f048a08af5c63729fc134 /src/lib
parentb3846a3f0f650ded3019bb4305b63d5675fb9d74 (diff)
Only look in the filename (not the whole path) when guessing channels for sound files (#2204).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/audio_mapping.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/audio_mapping.cc b/src/lib/audio_mapping.cc
index 8b9f102a5..aa67f5097 100644
--- a/src/lib/audio_mapping.cc
+++ b/src/lib/audio_mapping.cc
@@ -125,7 +125,7 @@ AudioMapping::make_default (AudioProcessor const * processor, optional<boost::fi
if (filename) {
for (int i = 0; i < regexes; ++i) {
boost::regex e (regex[i].regex, boost::regex::icase);
- if (boost::regex_match(filename->string(), e) && regex[i].channel < output_channels()) {
+ if (boost::regex_match(filename->filename().string(), e) && regex[i].channel < output_channels()) {
set (0, regex[i].channel, 1);
guessed = true;
}