Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#102 osTempdir() bug

open-fixed
nobody
None
5
2008-11-26
2008-11-25
Kevin Egan
No

I believe two cases are switched in os.cpp. I was getting a bad path because the TMP environment variable was not defined. I haven't checked the other OS cases.

Index: src/common/os.cpp

--- src/common/os.cpp (revision 1174)
+++ src/common/os.cpp (working copy)
@@ -274,9 +274,9 @@
if (!tempDirEnv)
tempDirEnv = osEnvironment("TMP");
if (!tempDirEnv)
+ snprintf(result,resultsize,"PixieTemp_%d/",getpid());
+ else
snprintf(result,resultsize,"%s/PixieTemp_%d/",tempDirEnv,getpid());
- else
- snprintf(result,resultsize,"PixieTemp_%d/",getpid());
#endif

osFixSlashes(result);

Discussion

  • Okan Arikan
    Okan Arikan
    2008-11-26

    Very true. The trunk is fixed.

    Thank you,

    Okan

     
  • Okan Arikan
    Okan Arikan
    2008-11-26

    • status: open --> open-fixed