Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/kimono-koans/httm
Browse files Browse the repository at this point in the history
  • Loading branch information
kimono-koans committed Jun 23, 2024
2 parents 7d27a26 + 67d594d commit 0ac673d
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions src/parse/snaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,29 @@ impl MapOfSnaps {
Self::from_defined_mounts(mount, dataset_info)
}
// btrfs Some mounts are potential local mount
FilesystemType::Btrfs(Some(base_subvol)) => Self::from_btrfs_cmd(
mount,
dataset_info,
&base_subvol,
map_of_datasets,
opt_debug,
),
FilesystemType::Btrfs(Some(base_subvol)) => {
let mut res = Self::from_btrfs_cmd(
mount,
dataset_info,
&base_subvol,
map_of_datasets,
opt_debug,
);

if res.is_empty() {
static NOTICE_FALLBACK: Once = Once::new();

NOTICE_FALLBACK.call_once(|| {
eprintln!(
"NOTICE: Falling back to detection of btrfs snapshot mounts perhaps defined by Snapper.",
);
});

res = Self::from_defined_mounts(mount, dataset_info);
}

res
}
// btrfs None mounts are potential Snapper network mounts
FilesystemType::Btrfs(None) => Self::from_defined_mounts(mount, dataset_info),
};
Expand Down

0 comments on commit 0ac673d

Please sign in to comment.