From 9d112a4ff88fcae5f4fe9c44bc1b0a3c3aec3c3d Mon Sep 17 00:00:00 2001 From: ifomin Date: Sat, 21 Jun 2025 17:49:42 +0300 Subject: [PATCH] take into account subvolume hierarchy when comparing paths in probe_target --- client/snbk/TheBigThing.cc | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.47.3