Skip to content

Commit

Permalink
storage: Fix root subvolume identification for Delete action
Browse files Browse the repository at this point in the history
When nothing is mounted, we don't know the IDs of subvolumes, only
their names. Make the check for whether to include the "Delete" action
also work in that case.
  • Loading branch information
mvollmer authored and martinpitt committed Feb 19, 2024
1 parent 829f8aa commit 07afa99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storaged/btrfs/subvolume.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export function make_btrfs_subvolume_page(parent, volume, subvol) {
}

// Don't show deletion for the root subvolume as it can never be deleted.
if (subvol.id !== 5)
if (subvol.id !== 5 && subvol.pathname !== "/")
actions.push({
danger: true,
title: _("Delete"),
Expand Down

0 comments on commit 07afa99

Please sign in to comment.