diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index e3c5a54..680a667 100644 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -442,10 +442,15 @@ 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 ))