diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-12 03:43:39 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-12 03:43:39 +0200 |
commit | 04a5d5ad15899161b0ea0e53e0551d12d0401ca3 (patch) | |
tree | 0bf8a40cde2103e58965b67fd78d1919d94d2557 /debianutils | |
parent | c5bbd5d08543bbd18ebdeee2b0c3c35ac7e15729 (diff) | |
download | busybox-04a5d5ad15899161b0ea0e53e0551d12d0401ca3.tar.gz |
mktemp: fix "mktemp /path/to/tempfile.XXXXXX"
function old new delta
mktemp_main 152 167 +15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/mktemp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index c40211476..2c4e19670 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c @@ -50,7 +50,8 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv) opts = getopt32(argv, "dqtp:", &path); chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX"); - chp = concat_path_file(path, chp); + if (chp[0] != '/' || (opts & 8)) + chp = concat_path_file(path, chp); if (opts & 1) { /* -d */ if (mkdtemp(chp) == NULL) |