Euphoria
Ticket #641:
Use of M_DIR in filesys.e
-
Reported by
mattlewis
Mar 29, 2011
On non-Windows OSes, it isn't correct to call the M_DIR machine_func directly, but this is done inside of canonical_path() and abbreviate_path().
Details
1. Comment by mattlewis
Mar 29, 2011
See: hg:euphoria/rev/f34c75f267ec
changeset: 4771:f34c75f267ec branch: 4.0 user: Matt Lewis date: Tue Mar 29 10:34:04 2011 -0400 files: include/std/filesys.e description:
- use dir() function in filesys.e instead of M_DIR
- fixes ticket 641
2. Comment by SDPringle
Mar 29, 2011
In the case of calling from std/fliesys.e I beg to differ in the case of canonical path:
See the first thing the non-Windows implementation does is check for a wildcard. If there are no wildcards, then it calls machine_func(M_DIR, ...). So, your change adjusts it for use with wildcards. I think we need to look at what happens when a user passes wildcards in. Things might go really badly with wildcards. In working with foo/ba*/zar, instead of return the children of foo/ba* machine_func will return children of foo that match ba*. The function should probably generate an error in that case.