fixed a bug when btrfs subvol is /
This commit is contained in:
parent
5ca2729bff
commit
24af09986f
|
@ -158,7 +158,11 @@ if [[ -z "$1" ]]; then
|
|||
exit 0
|
||||
else
|
||||
if is_subvolume "$1"; then
|
||||
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]"
|
||||
|
|
Loading…
Reference in New Issue