mirror of
https://github.com/mbusb/multibootusb
synced 2024-11-18 15:25:46 +00:00
Bug fix for:
1. Crash when listing fixed partition 2. Crash when uninstalling distros (tested on windows) due to permission error of ldlinux.sys and ldlinux.c32
This commit is contained in:
parent
7d45a6dfba
commit
4428d0e962
@ -194,7 +194,7 @@ Are you SURE you want to enable it?",
|
|||||||
|
|
||||||
self.ui.combo_drives.clear()
|
self.ui.combo_drives.clear()
|
||||||
if self.ui.checkbox_all_drives.isChecked():
|
if self.ui.checkbox_all_drives.isChecked():
|
||||||
detected_devices = usb.list_devices(partition=1, fixed=True)
|
detected_devices = usb.list_devices(fixed=True)
|
||||||
else:
|
else:
|
||||||
detected_devices = usb.list_devices()
|
detected_devices = usb.list_devices()
|
||||||
|
|
||||||
|
@ -116,6 +116,12 @@ def uninstall_distro():
|
|||||||
with open(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "iso_file_list.cfg"), "r") as f:
|
with open(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "iso_file_list.cfg"), "r") as f:
|
||||||
config.iso_file_list = f.readlines()
|
config.iso_file_list = f.readlines()
|
||||||
|
|
||||||
|
for path, subdirs, files in os.walk(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name)):
|
||||||
|
for name in files:
|
||||||
|
if name.endswith('ldlinux.sys') or name.endswith('ldlinux.c32'):
|
||||||
|
os.chmod(os.path.join(path, name), 0o777)
|
||||||
|
os.unlink(os.path.join(path, name))
|
||||||
|
|
||||||
if config.distro == "opensuse":
|
if config.distro == "opensuse":
|
||||||
if os.path.exists(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso")):
|
if os.path.exists(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso")):
|
||||||
os.remove(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso"))
|
os.remove(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso"))
|
||||||
|
Loading…
Reference in New Issue
Block a user