Exclude destintion dir from listing for last dir
This commit is contained in:
parent
2788de47b8
commit
c39205d308
1 changed files with 3 additions and 1 deletions
4
ccollect
4
ccollect
|
@ -753,8 +753,10 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
|||
|
||||
#
|
||||
# Check for backup directory to clone from: Always clone from the latest one!
|
||||
# Exclude destination_dir from listing, it can be touched reused and renamed
|
||||
# oldest existing destination directory.
|
||||
#
|
||||
last_dir="$(ls -${TSORT}p1 | grep '/$' | head -n 1)" || \
|
||||
last_dir="$(ls -${TSORT}p1 | grep '/$' | grep -v "${destination_dir}" | head -n 1)" || \
|
||||
_exit_err "Failed to list contents of ${ddir}."
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue