Mercurial > vim
comparison src/fileio.c @ 2695:b0605f2f9786 v7.3.113
updated for version 7.3.113
Problem: Windows: Fall back directory for creating temp file is wrong.
Solution: Use "." instead of empty string. (Hong Xu)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 09 Feb 2011 14:47:03 +0100 |
parents | 951641b8784d |
children | 6cc8a093e4a9 |
comparison
equal
deleted
inserted
replaced
2694:fcea35e2a41f | 2695:b0605f2f9786 |
---|---|
7457 char_u *retval; | 7457 char_u *retval; |
7458 char_u *p; | 7458 char_u *p; |
7459 | 7459 |
7460 STRCPY(itmp, ""); | 7460 STRCPY(itmp, ""); |
7461 if (GetTempPath(_MAX_PATH, szTempFile) == 0) | 7461 if (GetTempPath(_MAX_PATH, szTempFile) == 0) |
7462 szTempFile[0] = NUL; /* GetTempPath() failed, use current dir */ | 7462 { |
7463 szTempFile[0] = '.'; /* GetTempPath() failed, use current dir */ | |
7464 szTempFile[1] = NUL; | |
7465 } | |
7463 strcpy(buf4, "VIM"); | 7466 strcpy(buf4, "VIM"); |
7464 buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ | 7467 buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ |
7465 if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) | 7468 if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) |
7466 return NULL; | 7469 return NULL; |
7467 /* GetTempFileName() will create the file, we don't want that */ | 7470 /* GetTempFileName() will create the file, we don't want that */ |