[fpc-pascal] Too tired? Forcedirectories does not seem to work

ik idokan at gmail.com
Mon Feb 6 17:49:00 CET 2012


On Mon, Feb 6, 2012 at 18:40, Reinier Olislagers <
reinierolislagers at gmail.com> wrote:

> Busy porting FPCUP to Linux... think it's time to quit for the day....
>
> This code:
> OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory);
> debugln('todo: debug: forcedirectories bootstrap compiler dir:
> '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded));
>
> should create a directory (~/fpcbootstrap by default):
> The output that debugln produces:
> Debug: todo: debug: forcedirectories bootstrap compiler dir:
> ~/fpcbootstrap/ result: -1
>
> Result=-1, so that's true & it must have worked, right?
>
> No, the directory is not created:
> pascaldev at debianlaz:~$ ls ~/fpcbootstrap
> ls: cannot access /home/pascaldev/fpcbootstrap: No such file or directory
>
>
> What am I doing wrong?
> Should I spell out the entire path /home/pascaldev/fpcbootstrap/? Leave
>

You should use ExpandFileName on ForceDirectory's content prior on sending
it to it.


> the trailing slash?
>
> Thanks for any tips,
> Reinier
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120206/35aa62b6/attachment.html>


More information about the fpc-pascal mailing list