mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-vista
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
This commit is contained in:
commit
17fb92cce4
1 changed files with 14 additions and 0 deletions
|
@ -59,11 +59,25 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
|
||||||
myf MyFlags __attribute__((unused)))
|
myf MyFlags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
File file= -1;
|
File file= -1;
|
||||||
|
#ifdef __WIN__
|
||||||
|
TCHAR path_buf[MAX_PATH-14];
|
||||||
|
#endif
|
||||||
|
|
||||||
DBUG_ENTER("create_temp_file");
|
DBUG_ENTER("create_temp_file");
|
||||||
DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
|
DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
|
||||||
#if defined (__WIN__)
|
#if defined (__WIN__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
Use GetTempPath to determine path for temporary files.
|
||||||
|
This is because the documentation for GetTempFileName
|
||||||
|
has the following to say about this parameter:
|
||||||
|
"If this parameter is NULL, the function fails."
|
||||||
|
*/
|
||||||
|
if (!dir)
|
||||||
|
{
|
||||||
|
if(GetTempPath(sizeof(path_buf), path_buf) > 0)
|
||||||
|
dir = path_buf;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
Use GetTempFileName to generate a unique filename, create
|
Use GetTempFileName to generate a unique filename, create
|
||||||
the file and release it's handle
|
the file and release it's handle
|
||||||
|
|
Loading…
Add table
Reference in a new issue