changeset 21418:ca8450b9ef5b

Only show Octave executable files in list of @class methods (bug #46416). * load-path.cc (get_fcn_files): Only add file to function list if it ends in ".m", ".oct", or ".mex".
author Rik <rik@octave.org>
date Tue, 08 Mar 2016 13:52:03 -0800
parents 7ce76114b321
children 13415264b9f8
files libinterp/corefcn/load-path.cc
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Tue Mar 08 12:59:25 2016 -0500
+++ b/libinterp/corefcn/load-path.cc	Tue Mar 08 13:52:03 2016 -0800
@@ -259,15 +259,12 @@
         {
           std::string fname = flist[i];
 
-          std::string ext;
-          std::string base = fname;
-
           size_t pos = fname.rfind ('.');
 
           if (pos != std::string::npos)
             {
-              base = fname.substr (0, pos);
-              ext = fname.substr (pos);
+              std::string base = fname.substr (0, pos);
+              std::string ext = fname.substr (pos);
 
               if (valid_identifier (base))
                 {
@@ -280,7 +277,8 @@
                   else if (ext == ".mex")
                     t = load_path::MEX_FILE;
 
-                  retval[base] |= t;
+                  if (t)
+                    retval[base] = t;
                 }
             }
         }