diff options
| author | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-05-16 13:00:18 -0400 |
|---|---|---|
| committer | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-05-23 22:11:19 -0400 |
| commit | 8d51e55b5f0ae7bdebfaa606ab61263be2829cc2 (patch) | |
| tree | d087e45f058448f9905817415960a42ee002ac1c /server/test/docker/templates/ubuntu-21.Dockerfile.in | |
| parent | f9ccdf99e560bae70d3a13325cec9dc0e3cc45b0 (diff) | |
Use mkstemp instead of tempnamfeature/replace-tempnam
This reverts commit fedd930a09a497c03df3ce5204ccbd80da724662. It
should be possible to use the filename as generated by `mkstemp`, the
problem was that we were using the wrong path-separator.
So the diff from fedd930a09a497c03df3ce5204ccbd80da724662 is as
follows:
@@ -338,7 +338,11 @@ strchomp (char *str)
return str;
}
-
+#if HAVE_W32
+#define MKTEMP_SEPARATOR "\\"
+#else
+#define MKTEMP_SEPARATOR "/"
+#endif
/**
* Create a new, temporary file and returns its name.
*
@@ -347,7 +351,7 @@ strchomp (char *str)
static char*
mktempfile()
{
- char template[] = P_tmpdir "epdfinfo_XXXXXX";
+ char template[] = P_tmpdir MKTEMP_SEPARATOR "epdfinfo_XXXXXX";
I have tested the change on Mac OSX and Linux. It is tested on Windows
10 by @ShuguangSun.
Closes: #110
Diffstat (limited to 'server/test/docker/templates/ubuntu-21.Dockerfile.in')
0 files changed, 0 insertions, 0 deletions
