tests: avoid \\ in path (win32)
This commit is contained in:
parent
3d74c5201f
commit
6338f865ad
@ -116,6 +116,7 @@ int init(void)
|
|||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char temp[256];
|
char temp[256];
|
||||||
|
DWORD len;
|
||||||
#endif
|
#endif
|
||||||
srandom(time(NULL));
|
srandom(time(NULL));
|
||||||
#ifdef ENABLE_FILENAMES_ICONV
|
#ifdef ENABLE_FILENAMES_ICONV
|
||||||
@ -131,8 +132,9 @@ int init(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif /* ENABLE_FILENAMES_ICONV */
|
#endif /* ENABLE_FILENAMES_ICONV */
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
GetTempPathA(sizeof(temp), temp);
|
len = GetTempPathA(sizeof(temp), temp);
|
||||||
snprintf(tmpdir, sizeof(tmpdir), "%s%sgrafx2-test.XXXXXX", temp, PATH_SEPARATOR);
|
snprintf(tmpdir, sizeof(tmpdir), "%s%sgrafx2-test.XXXXXX",
|
||||||
|
temp, temp[len-1] == PATH_SEPARATOR[0] ? "" : PATH_SEPARATOR);
|
||||||
#else
|
#else
|
||||||
snprintf(tmpdir, sizeof(tmpdir), "%s%sgrafx2-test.XXXXXX", "/tmp", PATH_SEPARATOR);
|
snprintf(tmpdir, sizeof(tmpdir), "%s%sgrafx2-test.XXXXXX", "/tmp", PATH_SEPARATOR);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user