From 965c295451916cf7f04d33fbf41ff2beb573439b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 6 Jul 2009 19:53:20 +0000 Subject: 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 --- gtk2_ardour/ardour_ui.cc | 8 ++++---- 1 file 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 (); -- cgit v1.2.3