Actions:
|
2024-09-30 15:44 AEST by Arthur Barrett - TEMP directory not always used as expected, eg: in crash
The temp documentation may need updating:
https://march-hare.com/library/cvsnt/Environment-variables.html
The 'global option' -T was ignored as was the registry setting only the environment variable TMP/TEMP was
obeyed.
eg:
D:\cvsbin\release builder\cvsnt\cvsntcpl>cvs -T e:\testcrash --crash info
CVSNT crashed.
Writing crashdump.
Crashdump succeeded. Zipping to "C:\Users\abarrett\AppData\Local\Temp\cvsnt-2.8.01.9045-NEW-CVSNT-
BUILD-2ee066fa36fb66c3-large.dmp.gz".
Crashdump complete. %TEMP%\cvsnt-2.8.01.9045-NEW-CVSNT-BUILD-2ee066fa36fb66c3-large.dmp.gz
written.
D:\cvsbin\release builder\cvsnt\cvsntcpl>echo %TMP%
C:\Users\abarrett\AppData\Local\Temp
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\CVS\Pserver]
"TempDir"="d:\\test"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\March Hare Software Ltd\Server]
"TempDir"="d:\\test"
the function wnt_get_temp_dir() uses GetEnvironmentVariableA() for "TEMP" then "TMP" so it seems like the
PUTENV function is not working?
No the problem is that we're setting TMPDIR_ENV "TMPDIR"
The function wnt_get_temp_dir() should try "TMPDIR" then "TEMP" then "TMP"
And getcvstemp() should use the same
#define cvs_putenv wnt_putenv /* Win32 has its own version of this */
#ifdef HAVE_PUTENV
if (tmpdir_update_env)
cvs_putenv(TMPDIR_ENV, Tmpdir);
#endif |