Fixes subvol delete on a non-btrfs volume
Inode numbers are guaranteed to be unique only within a filesystem.
As such there is an edge case where these predicates are true on a
non-btrfs filesystem.
Closes
@@ -61,11 +61,13 @@ if command -v btrfs > /dev/null 2>&1; then
# Source: http://stackoverflow.com/a/32865333
for subvol in $(find "$dir" -type d -inum 256 | sort -r); do
if [ "$dir" != "$subvol" ]; then
+ if [ "$(stat -f --format=%T $subvol)" == "btrfs" ]; then
(
set -x
btrfs subvolume delete "$subvol"
)
fi
+ fi
done
fi
