diff --git a/src/lib66/tree_copy_tmp.c b/src/lib66/tree_copy_tmp.c index f84f6fc1b5f1f1eb90f0e9e552417874cc6d884c..bf71429861e193bb322c41201bf63a187e8db3b1 100644 --- a/src/lib66/tree_copy_tmp.c +++ b/src/lib66/tree_copy_tmp.c @@ -185,6 +185,11 @@ int tree_copy_tmp(char const *workdir, ssexec_t *info) r = scan_mode(saresolve.s,S_IFDIR) ; if (r < 0) strerr_dief2x(111,resolve," conflicting format") ; + if (r) + { + if (rm_rf(saresolve.s) <0) goto err ; + r = 0 ; + } if (!r) { saresolve.len = newlen ;