diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-26 02:07:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-26 02:07:59 +0000 |
commit | df78f284ee2707154cd56b2b25340f2fe8a8b6d2 (patch) | |
tree | ba23556f15cfecc1b358f4f1df611989c609bc62 /libs/ardour/io.cc | |
parent | fd384bf48e71b65ccd3858d10cc390c4128c469c (diff) |
fix up colons in track names before they are used for JACK port names; catch most (not all) attempted renames and ask the user about colons
git-svn-id: svn://localhost/ardour2/branches/3.0@9928 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index ae0cdcce29..6aaca08c90 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -1301,7 +1301,12 @@ IO::build_legal_port_name (DataType type) char buf1[name_size+1]; char buf2[name_size+1]; - snprintf (buf1, name_size+1, ("%.*s/%s"), limit, _name.val().c_str(), suffix.c_str()); + /* colons are illegal in port names, so fix that */ + + string nom = _name.val(); + replace_all (nom, ":", ";"); + + snprintf (buf1, name_size+1, ("%.*s/%s"), limit, nom.c_str(), suffix.c_str()); int port_number = find_port_hole (buf1); snprintf (buf2, name_size+1, "%s %d", buf1, port_number); |