aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMateusz Nowak <[email protected]>2024-04-16 21:16:20 +0200
committerAyke <[email protected]>2024-05-14 13:58:44 +0200
commitc78dbcd3f26f43a28b08a846a56d3448313ad033 (patch)
tree698b1c6ace23347b49c00093922a247e1f47179f
parent8890b57ba0f5d015560bf1c8e30d0393fc809c1f (diff)
downloadtinygo-c78dbcd3f26f43a28b08a846a56d3448313ad033.tar.gz
tinygo-c78dbcd3f26f43a28b08a846a56d3448313ad033.zip
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
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index b10f45cd7..3d030dba3 100644
--- a/main.go
+++ b/main.go
@@ -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