mktemp: fix template diagnostic with --suffix
commite397ba1a31b99dbe4460e1aa8124786d487451c1
authorlvgenggeng <lvgenggeng@uniontech.com>
Tue, 27 Feb 2024 01:41:27 +0000 (27 09:41 +0800)
committerPádraig Brady <P@draigBrady.com>
Tue, 27 Feb 2024 14:59:33 +0000 (27 14:59 +0000)
tree64f80ac2be67f62202c0ce2c13b09391aa45f422
parentf3bcb59ebdb4705c8034c01e25758f6eff71df51
mktemp: fix template diagnostic with --suffix

* src/mktemp.c (main): When --suffix is specified, TEMPLATE
points to the meraged buffer DEST_NAME. As X's in the suffix are
not significant to the generated random characters, the diagnostic
for too few X's should only refer to the template portion.
* tests/misc/mktemp.pl: Adjust accordingly.
* NEWS: Mention the bug fix.
NEWS
src/mktemp.c
tests/misc/mktemp.pl