diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-04-14 05:17:06 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-04-14 05:17:06 +0000 |
commit | aed3c204260197526cb450a788cfdd1199023e67 (patch) | |
tree | e61a716e81e6889ff53ea9550e08379518a27439 /lib/libarchive | |
parent | 06c7ab197542b866eabdc016004b744e8720c6f6 (diff) | |
download | FreeBSD-src-aed3c204260197526cb450a788cfdd1199023e67.zip FreeBSD-src-aed3c204260197526cb450a788cfdd1199023e67.tar.gz |
Portability: Don't use mkdtemp() when mkdir() will suffice.
If we can't create the dir, just give up.
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/test/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libarchive/test/main.c b/lib/libarchive/test/main.c index f9abce0..da5330d 100644 --- a/lib/libarchive/test/main.c +++ b/lib/libarchive/test/main.c @@ -130,9 +130,9 @@ int main(int argc, char **argv) */ now = time(NULL); strftime(tmpdir, sizeof(tmpdir), - "/tmp/libarchive_test.%Y-%m-%dT%H.%M.%S.XXXXXX", + "/tmp/libarchive_test.%Y-%m-%dT%H.%M.%S", localtime(&now)); - if (mkdtemp(tmpdir) == NULL) { + if (mkdir(tmpdir,0755) != 0) { fprintf(stderr, "ERROR: Unable to create temp directory %s\n", tmpdir); exit(1); |