diff --git a/contrib/nuke-graph-directory.sh b/contrib/nuke-graph-directory.sh index 3a1b5713d2..4b8581ecec 100755 --- a/contrib/nuke-graph-directory.sh +++ b/contrib/nuke-graph-directory.sh @@ -61,10 +61,12 @@ 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 - ( - set -x - btrfs subvolume delete "$subvol" - ) + if [ "$(stat -f --format=%T $subvol)" == "btrfs" ]; then + ( + set -x + btrfs subvolume delete "$subvol" + ) + fi fi done fi