summaryrefslogtreecommitdiff
path: root/mysys/mf_tempfile.c
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-11-04 16:14:09 +0200
committermonty@hundin.mysql.fi <>2001-11-04 16:14:09 +0200
commitfd0780493d9f91c1b4e8a0ff80fc670d5cf3b19a (patch)
tree689c9d0271e23431f1ab0ac09e1af4d68a58ca76 /mysys/mf_tempfile.c
parent67951fdeb4195d6fcefeba6aab811b6c5e585178 (diff)
parent65d4c846d83467270e56537b2cd0f44fc37ef9be (diff)
downloadmariadb-git-fd0780493d9f91c1b4e8a0ff80fc670d5cf3b19a.tar.gz
merge with 3.23.44
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r--mysys/mf_tempfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index d8a67990a52..262fce64277 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -126,6 +126,9 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
// changing environ variable doesn't work with VACPP
char buffer[256];
sprintf( buffer, "TMP=%s", dir);
+ // remove ending backslash
+ if (buffer[strlen(buffer)-1] == '\\')
+ buffer[strlen(buffer)-1] = '\0';
putenv( buffer);
#else
old_env= (char**) environ;