[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/" |
Date: |
Fri, 3 Jun 2016 21:25:36 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #2, bug #48105 (project octave):
I'm pretty sure this is a gnulib quirk. I created the same test directory
containing two directories and two files
ls -F
d/ dir/ f file
I then used perl, which I believe is linked against the system library version
of glob, to check.
perl -de 42
@a = glob ('f*');
X a
@a = (
0 'f'
1 'file'
)
@b = glob ('f*/');
X b
So, the first question is why gnulib isn't just using the system version of
glob that is defined in glob.h, as long as it is reasonable. I thought gnulib
was smart enough not to substitute C code where it didn't have too. Second,
since it appears to be using it's own implementation, why doesn't it have it
right?
Just to check, I went and edited oct-glob.cc. I changed
#include <glob.h>
to
#include "/usr/include/glob.h"
I then took the gnulib:: namespace decorator off the call to glob and
globfree. After re-compiling, Octave returns an empty cell array for the
pattern 'f*/'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48105>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", anonymous, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/",
Rik <=
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Rik, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Mike Miller, 2016/06/03
- [Octave-bug-tracker] [bug #48105] function "glob" oddities with trailing "/", Rik, 2016/06/04