fileparts / fullfile inconsistency
Francesco Potorti`
Potorti at isti.cnr.it
Fri Oct 3 09:25:24 CDT 2008
This is what I observe, and I think it is inconsistent. I do not know
if this is incostintent as Matlab is, though.
In the 1st, 2nd and 4th cases, I can use fullfile to reconstruct what
fileparts has separated. Not in the 3rd case, though.
This is Octave 3.0.1.
I can propose a changeset if I am told what to do.
octave> [a b c]=fileparts("/dir/file.ext"), fullfile(a,[b c])
a = /dir
b = file
c = .ext
ans = /dir/file.ext
octave> [a b c]=fileparts("dir/file.ext"), fullfile(a,[b c])
a = dir
b = file
c = .ext
ans = dir/file.ext
octave> [a b c]=fileparts("/file.ext"), fullfile(a,[b c])
a =
b = file
c = .ext
ans = file.ext
octave> [a b c]=fileparts("file.ext"), fullfile(a,[b c])
a =
b = file
c = .ext
ans = file.ext
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: Potorti at isti.cnr.it
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/
More information about the Bug-octave
mailing list