lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


   well i solved it using tmpname(NULL,NULL)... it considers the
temporary directory of the system.
   when i use tmpnam() on windows on a non-writable root, the filename
generated (\something) is not writable...
   i guess it's an implementation bug
   thanks anyway
   -- Fred

> Frederico Rodrigues Abraham wrote:
>
>>     Hi. I tried to generate a temporary filename using os.tmpname()
>> and I got a bad filename ("\s2u0.").
>>     Do I need to do anything else to get a temporary filename?
>>     This happens only in Windows. In Linux it works.
>>     -- Fred
>
>
> This appears to depend on run-time library lua linked with.
> With MinGW I obtained (5 runs):
>   \s3us73kd.
>   \s3us73kd.1
>   \s3us73kd.2
>   \s3us73kd.3
>   \s3us73kd.4
> With Borland's:
>   TMP1.$$$
>   TMP2.$$$
>   TMP3.$$$
>   TMP4.$$$
>   TMP5.$$$
>