dir listing not starting with . and ..
Søren Hauberg
soren at hauberg.org
Wed Feb 4 07:04:42 CST 2009
Hi
With a recent checkout I see the following behaviour
octave:10> a = dir ("/tmp/oct-tylyzv");
octave:11> a (:).name
ans = statistics-1.0.4
ans = ..
ans = .
As you can see the last element of the directory listing is ".", and the
second last is "..". It used to be that this was reversed such that "."
was always the first element, and ".." was always the second element.
This is also what Matlab does.
I discovered this issue because it is no possible for me to install
packages in Octave, because 'pkg' assumes that the first "real"
directory returned by 'dir' is number 3 in the list generated by 'dir'.
Søren
More information about the Bug-octave
mailing list