We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bd680e commit 48e6bccCopy full SHA for 48e6bcc
90zfsbootmenu/zfsbootmenu-lib.sh
@@ -967,7 +967,11 @@ snapshot_dispatcher() {
967
zdebug "subkey: ${subkey}"
968
969
parent_ds="${selected%/*}"
970
- parent_ds="${selected%@*}"
+
971
+ # Generally, stripping "/*" from $selected will also drop the snapshot part;
972
+ # however, if $selected is the root dataset, $parent_ds == $selected because
973
+ # $selected contains no "/". In that case, the snapshot must be stripped too.
974
+ parent_ds="${parent_ds%@*}"
975
976
if [ -z "${parent_ds}" ]; then
977
zerror "unable to determine parent dataset for ${selected}"
0 commit comments