prevent destroying of root dataset which leads to infinite loop because it can't be destroyed

This commit is contained in:
Christoph Klaffl 2024-01-09 19:53:03 +01:00
parent 61000c9da2
commit 48d89c785e
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
1 changed files with 2 additions and 1 deletions

View File

@ -678,7 +678,8 @@ sub syncdataset {
}
if (! $bookmark) {
if ($args{'force-delete'}) {
# force delete is not possible for the root dataset
if ($args{'force-delete'} && index($targetfs, '/') != -1) {
if (!$quiet) { print "Removing $targetfs because no matching snapshots were found\n"; }
my $rcommand = '';