Skip to content

Fix WSL2 mountinfo parsing - #874

Open
SuperQ wants to merge 1 commit into
masterfrom
superq/fix_mountinfo_parse
Open

SuperQ wants to merge 1 commit into
masterfrom
superq/fix_mountinfo_parse

Conversation

@SuperQ

@SuperQ SuperQ commented Sep 27, 2026

Copy link
Copy Markdown
Member

The WSL2 mountinfo doesn't correctly escape paths in the super options list. Refactor the parser to split the line in stages before and after the - separator. This makes the parsing logic simpler since we don't need to track the separator index anymore.

  • Fix a small bug in the option parser that doesn't deal with multiple = chars in the comma-separated option strings.
  • Fix OptionalFields to always return an empty map rather than nil for no optional fields.

Fixes: #872

The WSL2 mountinfo doesn't correctly escape paths in the super options
list. Refactor the parser to split the line in stages before and after
the ` - ` separator. This makes the parsing logic simpler since we don't
need to track the separator index anymore.
* Fix a small bug in the option parser that doesn't deal with multiple `=`
  chars in the comma-separated option strings.
* Fix `OptionalFields` to always return an empty map rather than nil for
  no optional fields.

Fixes: #872

Signed-off-by: SuperQ <superq@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mountinfo: parse fails when super options contain an unescaped space (WSL2 + Docker Desktop 9p mount)

1 participant