Open agrover opened 4 years ago
then it seems like btrfs_util_is_subvolume
is returning true even if the path is not the root of a subvolume. I think one way to solve this issue is to cannonicalize the path and then check if stripping the last path component yields the same subvolume id, a different id, or returns either the NOT_SUBVOLUME or the NOT_BTRFS subvolume.
I tried calling
Subvolume::get()
with the path to a normal directory on a btrfs filesystem and it worked, contrary to what the above comment says. I'm not sure if the code, or the comment, needs to be changed.