restore significant part of last patch

This commit is contained in:
Anthony Minessale 2012-11-20 10:19:08 -06:00
parent bfae89267e
commit 55ac6d22ad
1 changed files with 3 additions and 0 deletions

View File

@ -670,6 +670,9 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
#ifdef WIN32
GetTempPath(dwBufSize, lpPathBuffer);
lpPathBuffer[strlen(lpPathBuffer)-1] = 0;
tmp = switch_string_replace(lpPathBuffer, "\\", "/");
strcpy(lpPathBuffer, tmp);
free(tmp);
switch_snprintf(SWITCH_GLOBAL_dirs.temp_dir, BUFSIZE, "%s", lpPathBuffer);
#else
switch_snprintf(SWITCH_GLOBAL_dirs.temp_dir, BUFSIZE, "%s", "/tmp");