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

2012-02-07 Thread Jürgen Hestermann
Reinier Olislagers schrieb: And while ~ is a relative path, No, this is an absolute path (pointing to the home directory). It only needs expansion to give you this absolute path. It's just a placeholder for a certain absolute path (which can vary). One or two dots would be a relative path

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

2012-02-07 Thread Reinier Olislagers
On 7-2-2012 17:37, Jürgen Hestermann wrote: Reinier Olislagers schrieb: But ~ is not the only placeholder that will be expanded. Relative paths would become absolute paths and environment variables will be replaced by their values too. And I think it's not restricted to Linus/Unix, it happens

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

2012-02-07 Thread michael . vancanneyt
On Tue, 7 Feb 2012, Jürgen Hestermann wrote: Reinier Olislagers schrieb: And while ~ is a relative path, But ~ is not the only placeholder that will be expanded. Relative paths would become absolute paths and environment variables will be replaced by their values too. And I think it's

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

2012-02-07 Thread Tomas Hajny
On Tue, February 7, 2012 17:43, michael.vancann...@wisa.be wrote: On Tue, 7 Feb 2012, Jürgen Hestermann wrote: Reinier Olislagers schrieb: And while ~ is a relative path, But ~ is not the only placeholder that will be expanded. Relative paths would become absolute paths and environment

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

2012-02-07 Thread Jürgen Hestermann
Reinier Olislagers schrieb: That's fine. If you just say anything gets expanded to an absolute path, in my mind: 1. you're implying the thing you're expanding is relative (even if you're not saying so) No, IMO this is not true. A relative path is relative to the current directory (or some

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

2012-02-07 Thread Reinier Olislagers
On 7-2-2012 18:34, Jürgen Hestermann wrote: Reinier Olislagers schrieb: That's fine. If you just say anything gets expanded to an absolute path, in my mind: 1. you're implying the thing you're expanding is relative (even if you're not saying so) No, IMO this is not true. A relative path...

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

2012-02-06 Thread Reinier Olislagers
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

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

2012-02-06 Thread ik
On Mon, Feb 6, 2012 at 18:40, Reinier Olislagers reinierolislag...@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

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

2012-02-06 Thread Henry Vermaak
On 06/02/12 16:40, Reinier Olislagers 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:

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

2012-02-06 Thread Reinier Olislagers
On 6-2-2012 17:49, ik wrote: On Mon, Feb 6, 2012 at 18:40, Reinier Olislagers reinierolislag...@gmail.com mailto:reinierolislag...@gmail.com wrote: Busy porting FPCUP to Linux... think it's time to quit for the day This code:

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

2012-02-06 Thread Henry Vermaak
On 06/02/12 16:50, Henry Vermaak wrote: Your shell expands ~ to your home directory. Your program will have to do this manually (i.e. read the HOME environment variable). Like Ido mentioned, ExpandFileName does this already. Perhaps the documentation could mention it. Henry

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

2012-02-06 Thread Reinier Olislagers
On 6-2-2012 17:50, Henry Vermaak wrote: On 06/02/12 16:40, Reinier Olislagers wrote: This code: OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); debugln('todo: debug: forcedirectories bootstrap compiler dir: '+bootstrapcompilerdirectory+' result:

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

2012-02-06 Thread Rich Saunders
On 2/6/12 11:49 AM, ik wrote: You should use ExpandFileName on ForceDirectory's content prior on sending it to it. And then go find the directory that you created in error and remove it! ;) Rich ___ fpc-pascal maillist -

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

2012-02-06 Thread Sven Barth
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: This code: OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); debugln('todo: debug: forcedirectories bootstrap compiler dir:

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

2012-02-06 Thread Reinier Olislagers
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.