Commit 7701bdb0 authored by Darko Poljak's avatar Darko Poljak

Use destination dir basename

parent c39205d3
......@@ -756,7 +756,8 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
# Exclude destination_dir from listing, it can be touched reused and renamed
# oldest existing destination directory.
#
last_dir="$(ls -${TSORT}p1 | grep '/$' | grep -v "${destination_dir}" | head -n 1)" || \
dest_dir_name=$(basename "${destination_dir}")
last_dir="$(ls -${TSORT}p1 | grep '/$' | grep -v "${dest_dir_name}" | head -n 1)" || \
_exit_err "Failed to list contents of ${ddir}."
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment