Commit 25512f3
committed
Fix WASI path mapping processing
Filesystem paths can be mapped from the host path to a guest path using
the format `<guest-path>::<host-path>`.
Previously `strtok` was used to find the `::` delimiter. Unfortunately
`strtok` processes each delimiter character individually. This meant
that the code was ~equivalent to `strtok(mapping_copy, ":")` which
breaks with Windows-style paths (E.g. `C:\my_path\`).
To fix this `strstr` is used to search for the exact delimiter.1 parent f1d03db commit 25512f3
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3631 | 3631 | | |
3632 | 3632 | | |
3633 | 3633 | | |
3634 | | - | |
3635 | | - | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
3636 | 3646 | | |
3637 | 3647 | | |
3638 | 3648 | | |
| |||
0 commit comments