Archive : Skip unarchive if not an archive.

This commit is contained in:
Dmitry Voronin 2024-03-12 20:52:58 +03:00
parent 595432957a
commit 176c458e2b
2 changed files with 5 additions and 1 deletions

View file

@ -234,6 +234,10 @@ function unarchive() {
process() { process() {
# Validate. # Validate.
# _archive_check "${target}" || return 1 # _archive_check "${target}" || return 1
if ! _is_archive "${target}"; then
_iterate_skip "Not an archive."
return 0
fi
# Remote archives. # Remote archives.
local remote local remote

View file

@ -69,7 +69,7 @@ function _iterate_targets() {
function _iterate_skip() { function _iterate_skip() {
((skipped++)) ((skipped++))
[[ "${*}" = "" ]] || echo -e "${color_byellow}${*}${color_default}" [[ "${*}" != "" ]] && echo -e "${color_byellow}${*}${color_default}"
} }
# Report an error. # Report an error.