1
1
Fork 0

fixed a bug when btrfs subvol is /

This commit is contained in:
david 2023-10-30 12:17:37 +01:00
parent 5ca2729bff
commit 24af09986f
1 changed files with 5 additions and 1 deletions

View File

@ -158,7 +158,11 @@ if [[ -z "$1" ]]; then
exit 0
else
if is_subvolume "$1"; then
SNAP_FOLDER="${1%/}/$SNAP_FOLDER"
if [[ "$1" == "/" ]]; then
SNAP_FOLDER="/$SNAP_FOLDER"
else
SNAP_FOLDER="${1%/}/$SNAP_FOLDER"
fi
# Create $SNAP_FOLDER if it does not exist
if [[ ! -d "$SNAP_FOLDER" ]]; then
lib_print "?Creating snapshot folder because it does not yet exist [$SNAP_FOLDER]"