Skip to content

Commit

Permalink
Merge pull request zfsonlinux#91 from schors/master
Browse files Browse the repository at this point in the history
Fix recursive snapshots
  • Loading branch information
Jonathan Carter authored Apr 12, 2019
2 parents d27bbfa + 6ee4553 commit 3689b2c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/zfs-auto-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,19 @@ do
iii="$ii/"


# Exclude datasets that are not named on the command line.
# Exclude datasets
# * that are not named on the command line or
# * those whose prefix is not on the command line (if --recursive flag is set)
IN_ARGS='0'
for jj in "$@"
do
# Ibid regarding iii.
jjj="$jj/"

if [ "$jj" = '//' -o "$jj" = "$ii" ]
then
IN_ARGS=$(( $IN_ARGS + 1 ))
elif [ -n "$opt_recursive" -a "$iii" != "${iii#$jjj}" ]
then
IN_ARGS=$(( $IN_ARGS + 1 ))
fi
Expand Down

0 comments on commit 3689b2c

Please sign in to comment.