Permalink
Browse files
simply find operation in action_restore
- Loading branch information...
Showing
with
2 additions
and
2 deletions.
-
+2
−2
squashfu
|
@@ -344,7 +344,7 @@ action_restore () { |
|
|
|
|
|
mount_squash || die "Failed to mount seed"
|
|
|
|
|
|
- IFS=$'\n' read -r -d $'\0' -a results < <(find $BINS_DIR/*/${1%/*}/${1##*/} -maxdepth 0 2>/dev/null)
|
|
|
+ IFS=$'\n' read -r -d'\0' -a results < <(find "$BINS_DIR"/*/"$1" -maxdepth 0 2>/dev/null)
|
|
|
|
|
|
declare -a snaps
|
|
|
[[ -e "$SQUASH_MOUNT/$1" ]] && snaps[0]=$(stat -c %Z "$SQUASH_MOUNT/$1")
|
|
@@ -354,7 +354,7 @@ action_restore () { |
|
|
die "Target not found: '$1'"
|
|
|
fi
|
|
|
|
|
|
- info "Found ${1##*/}in the following backups:"
|
|
|
+ info "Found ${1##*/} in the following backups:"
|
|
|
[[ -n ${snaps[0]} ]] && printf " 0\t%s\n" "$(date --date=@${snaps[0]})"
|
|
|
for result in "${results[@]}"; do
|
|
|
local bin=$(sed -n "s|$BINS_DIR/\([0-9]*\)$1|\1|p" <<< "$result")
|
|
|
0 comments on commit
09fcf1c