-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Guillaume Lemaître a écrit :
> Hi,
>
> Before any further investigation, I wanted to know if someone has any
> clue on the not-so-homogenous behaviour of DIRECTORY.
>
> For example, if I have an instance 'wd' of DIRECTORY:
> - wd.scan( ".") ==> wd.path = "/foo/bar/"
> - wd.scan( ".." ) ==> wd.path = "/foo"
>
> The issue is that I was supposing that I could rebuild path of any file
> by concatenation of wd.path and wd.item, totally ignoring kind of
> directory separators shall be used on a particular system.
>
> As I don't know if it is supposed to work this way, I cannot say if
> wd.scan( ".." ) not setting wd.path to "/foo/" is a bug.
>
> Does anybody has a clue?
>
> Regards,
>
> Guillaume
Hello,
Here is a small patch (on 2.3) that fixes the issue.
Regards,
Guillaume
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkmcbo4ACgkQGl8D2UjaRECTBgCgkexv09bBK2tWvWkIHPqLiK/K
TtEAn2/ls4HFvKyxKVPfLuXzNtkUL9Sp
=08/O
-----END PGP SIGNATURE-----
--- SmartEiffel/lib/io/internal/unixish_path_name.e 2007-07-11 19:23:43.000000000 +0200
+++ SmartEiffel/lib/io/internal/unixish_path_name.e 2009-02-18 21:19:53.000000000 +0100
@@ -68,7 +68,7 @@
elseif lst.is_equal(up_directory) then
add_last(up_directory)
else
- remove_last
+ path.remove_tail(lst.count)
end
end
end