summaryrefslogtreecommitdiffstats
path: root/perform/zip_perf.c
diff options
context:
space:
mode:
Diffstat (limited to 'perform/zip_perf.c')
-rw-r--r--perform/zip_perf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index c2ba1fc..35a3706 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -321,14 +321,18 @@ uncompress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source,
static void
get_unique_name(void)
{
- const char *prefix = "/tmp", *tmpl = "/zip_perf.data";
+ const char *prefix = "", *tmpl = "zip_perf.data";
const char *env = getenv("HDF5_PREFIX");
- if (env)
+ if (env) {
prefix = env;
+ strcat(prefix, "/");
+ }
- if (option_prefix)
+ if (option_prefix) {
prefix = option_prefix;
+ strcat(prefix, "/");
+ }
filename = calloc(1, strlen(prefix) + strlen(tmpl) + 1);