summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-06 19:53:20 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-06 19:53:20 +0000
commit965c295451916cf7f04d33fbf41ff2beb573439b (patch)
tree3edcd976d763021dc93f749c940fae4bb6fbccaf
parent187ec1ab298d211ee1fddcd5e98eced06cc999cd (diff)
correct check for presence of / or \ in a session name
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5336 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour_ui.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index be60ac728e..8b69e1505a 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1856,13 +1856,13 @@ ARDOUR_UI::snapshot_session ()
case RESPONSE_ACCEPT:
prompter.get_result (snapname);
if (snapname.length()){
- if (snapname.find ('/')) {
+ if (snapname.find ('/') != string::npos) {
MessageDialog msg (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a '/' character"));
msg.run ();
goto again;
}
- if (snapname.find ('\\')) {
+ if (snapname.find ('\\') != string::npos) {
MessageDialog msg (_("To ensure compatibility with various systems\n"
"snapshot names may not contain a '\\' character"));
msg.run ();
@@ -2354,7 +2354,7 @@ ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be
should_be_new = true;
- if (session_name.find ('/')) {
+ if (session_name.find ('/') != Glib::ustring::npos) {
MessageDialog msg (*new_session_dialog, _("To ensure compatibility with various systems\n"
"session names may not contain a '/' character"));
msg.run ();
@@ -2362,7 +2362,7 @@ ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be
goto try_again;
}
- if (session_name.find ('\\')) {
+ if (session_name.find ('\\') != Glib::ustring::npos) {
MessageDialog msg (*new_session_dialog, _("To ensure compatibility with various systems\n"
"session names may not contain a '\\' character"));
msg.run ();