fix: Correct LV vs VG selection logic

The refresh_drives method was incorrectly showing VGs for all modes.
Now correctly shows:
- LVs for: lv_to_lv, lv_to_raw, lv_to_borg, files_to_borg
- VGs for: vg_to_raw, vg_to_borg

This fixes the issue where users couldn't select individual LVs.
This commit is contained in:
root
2025-10-09 08:42:57 +02:00
parent 543b95cb61
commit bfd3c08fb3

View File

@@ -269,7 +269,7 @@ class SimpleBackupGUI:
self.source_combo.grid(row=0, column=0, sticky=(tk.W, tk.E))
# Source options
if mode == "vg_to_raw":
if mode == "vg_to_raw" or mode == "vg_to_borg":
# Show volume groups
success, output = self.run_command("vgs --noheadings -o vg_name,vg_size,pv_count", show_output=False)
if success:
@@ -289,7 +289,7 @@ class SimpleBackupGUI:
self.log("No volume groups found")
self.source_combo['values'] = []
else:
# Show logical volumes (all LV modes)
# Show logical volumes (all LV modes: lv_to_lv, lv_to_raw, lv_to_borg, files_to_borg)
success, output = self.run_command("lvs --noheadings -o lv_path,lv_size,vg_name", show_output=False)
if success:
lv_list = []