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: Mike Miller
Subject: [Octave-bug-tracker] [bug #47950] glob and dir functions are unable to escape square bracket characters in Windows
Date: Mon, 23 May 2016 05:44:15 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Update of bug #47950 (project octave):

                 Summary: glob and dir functions fail with escaped wildcard
characters in Windows => glob and dir functions are unable to escape square
bracket characters in Windows

    _______________________________________________________

Follow-up Comment #18:

Yes, this bug is about the inability to properly escape the left and right
square bracket characters so they can be passed as literal filename characters
on Windows.

On Windows, as you've confirmed, asterisk and question mark are not allowed as
literal characters, so there is no need to escape them. That leaves only the
left and right square brackets (updated summary again).

The normal behavior of the Windows shell and DIR command doesn't cover the use
of bracketed character sets, so I would argue that that is a Unix extension
and not something that most Windows users would expect to work (unless they
are working in a Cygwin or Msys bash shell).

I see two ways to address this issue, either document that there is no way to
use the glob() or dir() functions on filenames that contain square brackets
(document the current behavior), or add a rule that always escapes square
brackets in filenames on Windows (not Cygwin) before passing the string to the
glob function, and document that OS-specific difference.

    _______________________________________________________

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]