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>
This commit is contained in:
parent
c5bbd5d085
commit
04a5d5ad15
@ -50,6 +50,7 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
opts = getopt32(argv, "dqtp:", &path);
|
opts = getopt32(argv, "dqtp:", &path);
|
||||||
|
|
||||||
chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
|
chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
|
||||||
|
if (chp[0] != '/' || (opts & 8))
|
||||||
chp = concat_path_file(path, chp);
|
chp = concat_path_file(path, chp);
|
||||||
|
|
||||||
if (opts & 1) { /* -d */
|
if (opts & 1) { /* -d */
|
||||||
|
Loading…
Reference in New Issue
Block a user