btrfs-snap
btrfs-snap copied to clipboard
Remove trailing slash except for '/' mountpoints
btrfs-snap is currently broken when used against root filesystems. For example, invoking .../btrfs-snap -r / daily 3
results in the following message:
btrfs subvolume show: too few arguments
usage: btrfs subvolume show <subvol-path>
Show more information of the subvolume
ERROR: is not a btrfs mountpoint (or old version of btrfs-tools, try > 0.19)
This broke in commit 30ef9f3, which set mp
incorrectly for root mountpoints, causing mp
to be set to ''
instead of '/'
. Switching to using readlink
to fix this, which is more robust than using string manipulation.