Merge pull request #881 from phreaker0/force-delete-skip-root

prevent destroying of root dataset which leads to infinite loop
This commit is contained in:
Jim Salter 2024-01-13 15:44:18 -05:00 committed by GitHub
commit 54c2dacd20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -606,7 +606,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) {
writelog('INFO', "Removing $targetfs because no matching snapshots were found");
my $rcommand = '';