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 are unable to e


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #47950] glob and dir functions are unable to escape square bracket characters in Windows
Date: Mon, 23 May 2016 20:52:39 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40

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

It's doubtful that Windows users are even aware that dir.m invokes glob().

But I'd expect glob(), when invoked explicitly from the command line or in
user scripts, to work identically on all platforms.
If glob() can be made to work properly on Windows using [..] patterns, there's
no reason to cripple dir.m for that platform other than the extra work to get
glob() going.


Anyway, my C++ skills are a bit lacking so hopefully someone will pick this
up.

Just curious, would it be s/th like:

:
              std::replace_if (xpat.begin (), xpat.end (),
                               std::bind2nd (std::equal_to<char> (), '['),
                               '\[');
:


and similarly for ']' ?


    _______________________________________________________

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]