changeset 21717:efdf6424003a

Allow GUI to set breakpoints in @class/method (bug #41514). * octave-qt-link.cc (file_in_path): Take basename to be everything after "dir".
author Lachlan Andrew <lachlanbis@gmail.com>
date Fri, 15 Apr 2016 20:11:06 +1000
parents fccffef9d210
children 601ee461f231
files libgui/src/octave-qt-link.cc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-qt-link.cc	Mon May 16 21:51:10 2016 -0400
+++ b/libgui/src/octave-qt-link.cc	Fri Apr 15 20:11:06 2016 +1000
@@ -597,7 +597,11 @@
     {
       bool dir_in_load_path = load_path::contains_canonical (dir);
 
-      std::string base_file = octave_env::base_pathname (file);
+      // get base name, allowing "@class/method.m" (bug #41514)
+      std::string base_file = (file.length () > dir.length ())
+                              ? file.substr (dir.length () + 1)
+                              : octave_env::base_pathname (file);
+
       std::string lp_file = load_path::find_file (base_file);
 
       if (dir_in_load_path)