[Lazarus] GetTempDir return impartial path

Michael Van Canneyt michael at freepascal.org
Wed Jun 15 21:41:34 CEST 2011

On Wed, 15 Jun 2011, silvioprog wrote:

> Oops, the correct title is:
> "GetTempDir return a partial path".
> 2011/6/15 silvioprog <silvioprog at gmail.com>:
>> Hi.
>> I trying to use the GetTempDir, but I get only partial result, e.g.:
>> \xampp\tmp\
>> Was to be:
>> C:\xampp\tmp\
>> How to I get the complete path of temp dir of server (Apache)?

GetTempDir returns the contents of the TEMP or TMP environment variable.
If you get one without drive, it is what Apache passes to your CGI program.

You can also use the windows unit GetTempPath function, but that is not portable.

Maybe we can change the windows version of the GetTempDir() function to use 
GetTempPath instead.


More information about the Lazarus mailing list