diff --git a/yadm b/yadm index 6af23e8..dfba01b 100755 --- a/yadm +++ b/yadm @@ -752,7 +752,8 @@ function clone() { } local wc - wc="$(mktemp -d)" || error_out "Unable to create temporary directory" + wc="$(mk_tmp_dir)" + [ -d "$wc" ] || error_out "Unable to create temporary directory" # first clone without checkout debug "Doing an initial clone of the repository" @@ -2032,6 +2033,12 @@ function copy_perms { return 0 } +function mk_tmp_dir { + local tempdir="$YADM_DATA/tmp.$$.$RANDOM" + assert_parent "$tempdir/" + echo "$tempdir" +} + # ****** Prerequisites Functions ****** function require_archive() {