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

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

[Octave-bug-tracker] [bug #47950] glob and dir functions fail with escap


From: Rik
Subject: [Octave-bug-tracker] [bug #47950] glob and dir functions fail with escaped wildcard characters in Windows
Date: Fri, 20 May 2016 15:37:09 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #8, bug #47950 (project octave):

Just a guess, looking in liboctave/util/oct-glob.cc I see the following:


#if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
     && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
              std::replace_if (xpat.begin (), xpat.end (),
                               std::bind2nd (std::equal_to<char> (), '\\'),
                               '/');
#endif

              int err = gnulib::glob (xpat.c_str (), GLOB_NOSORT, 0,
&glob_info);


It appears that on Windows systems we change all path names that use the '\'
character as a file separator in to '/' before we call glob so that the
backslash is not treated as an escape character.

In this case, we want '\[' to escape the special meaning of the bracket but it
is being turned in to '/['. 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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