Use hidden empty directory for deletion

This commit is contained in:
Darko Poljak 2019-10-17 06:52:51 +02:00
parent 702cdf931e
commit 51dcf4a02f

View file

@ -175,7 +175,7 @@ delete_from_file()
fi fi
done < "${file}" done < "${file}"
_techo "Removing $@ in ${trash}..." _techo "Removing $@ in ${trash}..."
empty_dir="empty-dir" empty_dir=".empty-dir"
mkdir "${empty_dir}" || _exit_err "Empty directory ${empty_dir} cannot be created." mkdir "${empty_dir}" || _exit_err "Empty directory ${empty_dir} cannot be created."
[ "${VVERBOSE}" ] && echo "Starting: rsync -a --delete ${empty_dir} ${trash}" [ "${VVERBOSE}" ] && echo "Starting: rsync -a --delete ${empty_dir} ${trash}"
# rsync needs ending slash for directory content # rsync needs ending slash for directory content