2
0
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:
mbusb 2017-05-04 21:20:51 +05:30
parent 7d45a6dfba
commit 4428d0e962
2 changed files with 7 additions and 1 deletions

View File

@ -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()

View File

@ -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"))