On 6-2-2012 20:53, Sven Barth wrote: > On 06.02.2012 18:14, Reinier Olislagers wrote: >> On 6-2-2012 17:50, Henry Vermaak wrote: >>> On 06/02/12 16:40, Reinier Olislagers wrote: >> Perhaps I should submit a patch for the docs indicating that: >> - ForceDirectories requires an absolute path > > This is wrong. ForceDirectories works with relative paths as well. It > just does not work with path variables that are only known to the shell. > >> - On Unix/Linux, directories starting with ~ are considered relative >> (but where should that be put...) > > This is basic Linux/Unix knowledge: every path that does not start with > a "/" is a relative path.
Mmmm, must have been my tiredness. Yes, I know ~ is not an absolute path. I supposed ForceDirectories' failure to expand ~ meant it could not deal with absolute paths. Too tired to investigate further. And while ~ is a relative path, the defining characteristic is that is a character that gets expanded by (at least) the shell, as Mattias pointed out in his other mail. Still, ExpandFileName DOES expand ~ to /home/whatever, and that is not mentioned in help: "ExpandFileName expands the filename to an absolute filename." I think the docs for ExpandFileName should be updated to indicate ~ gets expanded, e.g.: "ExpandFileName expands the filename to an absolute filename. On Unix/Linux systems, ExpandFileName will also expand the ~ (home directory) symbol." Thanks, Reinier _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal