On Mon, 20 Aug 2012 14:38:05 +0200 Sven Barth <pascaldra...@googlemail.com> wrote:
> Am 20.08.2012 14:05, schrieb Jürgen Hestermann: > > Am 2012-08-20 00:17, schrieb Bart: > > > Does fpc have a function that determines if a given paths is the root > > > (e.g. '/' in Linux, 'F:\' in Windows)? > > > > The question is: For what reason is this function needed? If you use > > "subst" on Windows you can make every path to a root path if you want. > > Maybe because he wants to determine whether a path is absolute or not? No, for this there is FilenameIsAbsolute in LazUtils. It is about scanning the directory. Juha needs a simple heuristic if the converter should search the parent directory for related files. Apparently it is a bad idea to scan a root directory. See http://bugs.freepascal.org/view.php?id=22630 > So that he can e.g. convert an absolute path to a relative one so he can > save this in a configuration in a more "portable" way. "subst" (or > adding the path to DosDevices in the registry which is the way I prefer > for persistent substing ;) ) might be a completely wrong solution or a > solution where you shoot cannonballs on little birds... Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal