On 2/9/13, Michael Van Canneyt <mich...@freepascal.org> wrote: >> If creating the directory fails, the function does not return an >> errorcode, unless we decide to let it raise an exception in this >> case.. >
> There is only one way: > if the ForceCreate is implemented and if creation fails, an exception > will be raised. And in this case the OP still needs to do an extra check (try..except), so basically this does not solve his "problem" because it is unsolvable without the programmer checking/validating what GetAppConfigDir did. function GetAppConfigDir(Global: Boolean; ForceCreate: Boolean; WhatToDoIfCreationFails: TProcedure) would "solve" the original problem ;-) Bart Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal