Use mkdtempat instead of mkdtemp

This fixes an interaction of -C with incremental 'X'.
Problem reported by Pavel Cahyna.
* gnulib.modules: Remove mkdtemp.
Add tempname, since our mkdtempat uses it.
* lib/mkdtempat.c, lib/mkdtempat.h: New files.
* lib/Makefile.am (noinst_HEADERS): Add mkdtempat.h.
(libtar_a_SOURCES): Add mkdtempat.c.
* src/incremen.c: Include mkdtempat.h.
(purge_directory): Use mkdtempat, not mkdtemp.
This commit is contained in:
Paul Eggert
2026-04-13 00:02:17 -07:00
parent 0470c109c0
commit d479b2cc91
5 changed files with 53 additions and 2 deletions
+1 -1
View File
@@ -80,7 +80,6 @@ mbrtoc32-regular
mcel-prefer
mempcpy
mkdirat
mkdtemp
mkfifoat
modechange
nstrftime-limited
@@ -115,6 +114,7 @@ stringeq
strnlen
symlinkat
sys_stat-h
tempname
time_rz
timespec
timespec-sub