mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 13:05:00 +08:00
grub-btrfs: unquote snap variable
Fix #273 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
This commit is contained in:
@@ -297,7 +297,7 @@ snapshot_list()
|
|||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for snap in $(btrfs subvolume list -sa "${btrfs_subvolume_sort}" /); do # Parse btrfs snapshots
|
for snap in $(btrfs subvolume list -sa "${btrfs_subvolume_sort}" /); do # Parse btrfs snapshots
|
||||||
IFS=$oldIFS
|
IFS=$oldIFS
|
||||||
snap=("${snap}")
|
snap=(${snap})
|
||||||
local path_snapshot=${snap[@]:13:${#snap[@]}}
|
local path_snapshot=${snap[@]:13:${#snap[@]}}
|
||||||
if [ "$path_snapshot" = "DELETED" ]; then continue; fi # Discard deleted snapshots
|
if [ "$path_snapshot" = "DELETED" ]; then continue; fi # Discard deleted snapshots
|
||||||
[[ ${path_snapshot%%"/"*} == "<FS_TREE>" ]] && path_snapshot=${path_snapshot#*"/"} # Remove the "<FS_TREE>" string at the beginning of the path
|
[[ ${path_snapshot%%"/"*} == "<FS_TREE>" ]] && path_snapshot=${path_snapshot#*"/"} # Remove the "<FS_TREE>" string at the beginning of the path
|
||||||
|
|||||||
Reference in New Issue
Block a user