Skip to content

Commit

Permalink
Support UF2 drives with space in their name on Linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mateusznowakdev authored and aykevl committed May 14, 2024
1 parent 8890b57 commit c78dbcd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,10 @@ func findFATMounts(options *compileopts.Options) ([]mountPoint, error) {
if fstype != "vfat" {
continue
}
fspath := strings.ReplaceAll(fields[1], "\\040", " ")
points = append(points, mountPoint{
name: filepath.Base(fields[1]),
path: fields[1],
name: filepath.Base(fspath),
path: fspath,
})
}
return points, nil
Expand Down

0 comments on commit c78dbcd

Please sign in to comment.