octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53707] mfilename returns empty for filenames


From: Ceral Paquet
Subject: [Octave-bug-tracker] [bug #53707] mfilename returns empty for filenames beginning with period
Date: Fri, 20 Apr 2018 05:43:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Follow-up Comment #1, bug #53707 (project octave):

My C++ might be up to this challengs :)

I think the only change needed is in libinterp/parse-tree/oct-parse.yy on line
4727.

This

++
      if (epos <= dpos)
        epos = std::string::npos;

      fname = (epos != std::string::npos) ? fname.substr (0, epos) : fname;
--

becomes

++
      if (epos <= dpos+1)
        epos = std::string::npos;

      fname = (epos != std::string::npos) ? fname.substr (0, epos) : fname;
--

I'm currently recompiling to see if this does what I think it does. I.e. if
the last period '.' is also the first character then don't strip off the
extension.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53707>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]