btrfs-snap icon indicating copy to clipboard operation
btrfs-snap copied to clipboard

Remove trailing slash except for '/' mountpoints

Open alexadriaanse opened this issue 6 years ago • 0 comments

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.

alexadriaanse avatar Sep 21 '17 00:09 alexadriaanse