Support UF2 drives with space in their name on Linux

Some devices, such as Seeed Studio XIAO with Adafruit bootloader, use complex names for UF2 device. With this fix applied, /proc/mounts should be parsed correctly
This commit is contained in:
Mateusz Nowak
2024-04-16 21:16:20 +02:00
committed by Ayke
parent 8890b57ba0
commit c78dbcd3f2
+3 -2
View File
@@ -1033,9 +1033,10 @@ func findFATMounts(options *compileopts.Options) ([]mountPoint, error) {
if fstype != "vfat" { if fstype != "vfat" {
continue continue
} }
fspath := strings.ReplaceAll(fields[1], "\\040", " ")
points = append(points, mountPoint{ points = append(points, mountPoint{
name: filepath.Base(fields[1]), name: filepath.Base(fspath),
path: fields[1], path: fspath,
}) })
} }
return points, nil return points, nil