diff --git a/modules/filesystem/btrfs/btrfs.mod b/modules/filesystem/btrfs/btrfs.mod index 55989ca..ae0f67d 100644 --- a/modules/filesystem/btrfs/btrfs.mod +++ b/modules/filesystem/btrfs/btrfs.mod @@ -112,7 +112,11 @@ folder_snapshot() { if [[ -d $2/$sv ]]; then echo snapshot $sv already exists in $2. You must manually delete target snapshots! else - sudo $BTRFS_BIN sub snap $readonly $1/$sv $2 + if sudo mkdir -p "$2" > /dev/null; then + sudo $BTRFS_BIN sub snap $readonly "$1/$sv" "$2/$sv" + else + echo unable to make directory $2 so can not make subvolumes therein + fi fi done