From: ifomin Date: Sat, 21 Jun 2025 14:49:42 +0000 (+0300) Subject: take into account subvolume hierarchy when comparing paths in probe_target X-Git-Tag: v0.13.0~101^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1022%2Fhead;p=thirdparty%2Fsnapper.git take into account subvolume hierarchy when comparing paths in probe_target --- diff --git a/client/snbk/TheBigThing.cc b/client/snbk/TheBigThing.cc index 47e9c2ef..0ccc6206 100644 --- a/client/snbk/TheBigThing.cc +++ b/client/snbk/TheBigThing.cc @@ -326,6 +326,11 @@ namespace snapper if (target_path != mount_point) start = target_path.substr(mount_point.size() + 1) + "/"; + static const regex subvol_regex("\\[(.*?)\\]"); + smatch subvol; + if (regex_search(cmd_findmnt.get_source(), subvol, subvol_regex)) + start = subvol[1].str().substr(1) + "/" + start; + if (verbose) cout << _("Probing extra information for target snapshots.") << endl;