Update unversal legal path rule for windows

This commit is contained in:
Robin Gareus 2024-02-21 13:51:40 +01:00
parent ff82e53b85
commit 8b0b316565
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,10 @@ ARDOUR::legalize_for_path (const string& str)
string
ARDOUR::legalize_for_universal_path (const string& str)
{
return replace_chars (str, "<>:\"/\\|?*");
string rv = replace_chars (str, "<>:\"/\\|?*");
/* windows filenames can't end with ' ' or '.' */
rv.erase (rv.find_last_not_of(" .") + 1);
return rv;
}
/** Legalize for a URI path component. This is like