mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add check destdir exists
mkdir later is not creating parent directories and it is not desirable to use `mkdir -p` which could lead to existing directory reuse. So the parent directory should either exist or should be created.
This commit is contained in:
parent
ce18fb61c0
commit
e7b5c219ad
@ -57,6 +57,8 @@ mkdtemp() {
|
||||
destdir=$1
|
||||
template=$2
|
||||
|
||||
test -d "$destdir" || die "DIR ('$destdir') does not exist."
|
||||
|
||||
case "$template" in
|
||||
*XXXX) ;;
|
||||
*) die "Invalid template: $template (must have a suffix of at least 4 X's)";;
|
||||
|
Loading…
Reference in New Issue
Block a user