allow a wider selection of chars for pathname. fixes bug when session file cannot accomodate the actual path to audio files

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3167 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2008-03-24 00:15:52 +00:00
parent d0b0e3f7dd
commit 2ac3d86565

View file

@ -92,13 +92,13 @@ ustring
legalize_for_path (ustring str)
{
ustring::size_type pos;
ustring legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: ";
ustring illegal_chars = "/\\*";
ustring legal;
legal = str;
pos = 0;
while ((pos = legal.find_first_not_of (legal_chars, pos)) != string::npos) {
while ((pos = legal.find_first_of (illegal_chars, pos)) != string::npos) {
legal.replace (pos, 1, "_");
pos += 1;
}