Maybe this is a misunderstanding, Graydon: the ability to use relative paths *as parameter value*, and to have it automatically resolved against the current working directory, is certainly essential. But the *result* should be independent of whether the parameter was supplied as relative or absolute path. It is simply a bug.Use the file:list() function if you want to get relative paths. Kind regards,Hans-Jürgen Am Samstag, 24. September 2022 um 19:25:31 MESZ hat Graydon <graydon...@gmail.com> Folgendes geschrieben: On Fri, Sep 23, 2022 at 08:01:12PM +0200, Hans-Jürgen Rennau scripsit: > functions file:descendants and file:children return relative paths, if > input parameter $dir is a relative folder path. I regard this as a bug - > relative folder paths should be resolved against the current working > directory, so that a relative path and the corresponding absolute path are > equivalent parameters. The functions should always return absolute paths, > as the documentation promises.
The ability to get a file listing by relative path makes it simple to transfer a directory structure from one location to another location, mirroring in the result the structure of the source. This is valued and useful and I've always assumed it was in there on purpose. I would certainly wish it to be kept in the behaviour of the file functions. Yes, the core accessor functions use absolute paths, but there are file functions for constructing those from a base and a relative part; this facilities the "transfer structure" use case and is generally helpful for the broarder use case of "must construct a path". -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")