diff src/oct-parse.yy @ 11136:a51ac4198e1c

oct-parse.yy (load_fcn_from_file): also strip directory when computing function name from filename
author John W. Eaton <jwe@octave.org>
date Fri, 22 Oct 2010 04:24:11 -0400
parents 5677f3f7b5fa
children 40206fe759db
line wrap: on
line diff
--- a/src/oct-parse.yy
+++ b/src/oct-parse.yy
@@ -3721,6 +3721,10 @@
     {
       nm = octave_env::base_pathname (file);
       nm = nm.substr (0, nm.find_last_of ('.'));
+
+      size_t pos = nm.find_last_of (file_ops::dir_sep_str ());
+      if (pos != std::string::npos)
+        nm = nm.substr (pos+1pp);
     }
 
   if (autoload)