From 76c7e87c028f7fe3bfbf1ca54dde9e8b0c039d5f Mon Sep 17 00:00:00 2001 From: Nikolaus Gullotta Date: Tue, 23 Jun 2020 14:27:42 -0500 Subject: [PATCH] Make Session::session_name_is_legal less magical --- libs/ardour/session.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index d32e85b4d2..de6fec2f1b 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -6763,9 +6763,9 @@ Session::update_latency_compensation (bool force_whole_graph, bool called_from_b const std::string Session::session_name_is_legal (const string& path) { - char illegal_chars[] = { '/', '\\', ':', ';' }; + const string illegal_chars = "/\\:;"; - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < illegal_chars.length(); ++i) { if (path.find (illegal_chars[i]) != string::npos) { return std::string (1, illegal_chars[i]); }