diff options
Diffstat (limited to 'xdelta3/testing/file.h')
-rw-r--r-- | xdelta3/testing/file.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xdelta3/testing/file.h b/xdelta3/testing/file.h index 67309ac..05f9dde 100644 --- a/xdelta3/testing/file.h +++ b/xdelta3/testing/file.h | |||
@@ -311,8 +311,9 @@ class ExtFile { | |||
311 | public: | 311 | public: |
312 | ExtFile() { | 312 | ExtFile() { |
313 | static int static_counter = 0; | 313 | static int static_counter = 0; |
314 | char buf[32]; | 314 | pid_t pid = getpid(); |
315 | snprintf(buf, 32, "/tmp/regtest.%d", static_counter++); | 315 | char buf[64]; |
316 | snprintf(buf, 64, "/tmp/regtest.%d.%d", pid, static_counter++); | ||
316 | filename_.append(buf); | 317 | filename_.append(buf); |
317 | unlink(filename_.c_str()); | 318 | unlink(filename_.c_str()); |
318 | } | 319 | } |