Kaydet (Commit) cf227ed4 authored tarafından Clement Lefebvre's avatar Clement Lefebvre

Fix btrfs missing in file formats

mkfs.btrfs is in /bin (not /sbin), so it wasn't detected.
üst d943b3a1
......@@ -514,9 +514,12 @@ class PartitionDialog(object):
self.builder.get_object("label_use_as").set_markup(_("Format as:"))
self.builder.get_object("label_mount_point").set_markup(_("Mount point:"))
# Build supported filesystems list
filesystems = sorted(['', 'swap'] +
[fs[11:] for fs in getoutput('echo /sbin/mkfs.*').split()],
key=lambda x: 0 if x in ('', 'ext4') else 1 if x == 'swap' else 2)
filesystems = ['', 'swap']
for path in ["/bin", "/sbin"]:
for fs in getoutput('echo %s/mkfs.*' % path).split():
filesystems.append(fs.split("mkfs.")[1])
filesystems = sorted(filesystems)
filesystems = sorted(filesystems, key=lambda x: 0 if x in ('', 'ext4') else 1 if x == 'swap' else 2)
model = Gtk.ListStore(str)
for i in filesystems:
model.append([i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment