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.
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. Unfortunatelystrtok
processes each delimiter character individually. This meant that the code was ~equivalent tostrtok(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.