The slash that gets rewritten
Windows uses a backslash to separate directory components; every Unix-derived system uses a forward slash. A program compiled for Windows carries that assumption in its strings: C:\Users\save\game.dat, .\assets\textures\rock.png. When that program runs through a compatibility layer on Linux, every one of those backslashes must become a forward slash before the host kernel ever sees the path — or the open call returns nothing and the program silently fails to load its assets.
The rewriting happens at the syscall boundary: the layer intercepts every file-related call, scans the path argument, and substitutes separators in place before passing the corrected string to the host. For the vast majority of paths this is cheap — a linear scan over a short string. The cost only compounds when a program constructs paths dynamically at high frequency, concatenating fragments in a tight loop, because each resulting string must be scanned again on every call.
What the layer actually does, step by step
FROM THIS ENTRY- Drive prefix
C:\stripped and remapped to a real directory inside the compatibility prefix - Separator scanbackslashes replaced with forward slashes before the path reaches the host kernel
- Case foldingoptional directory scan to find a case-insensitive match when the literal path fails
- Syscall interceptionall of the above happens inside the intercepted call, before the kernel sees anything
Backslash rewriting is also where a second problem quietly nests: case sensitivity. Windows paths are case-insensitive by default; Linux ext4 is case-sensitive. A path that survives separator translation can still fail if the program asked for Textures\Rock.png and the file on disk is named textures/rock.png. The layer has to handle both problems, and in the worst case it handles them together — scanning a directory to find a case-folded match after it has already rewritten the separators.
The other edge case is the drive letter prefix. Linux has no concept of C:\; the layer maps it to a root inside a wine prefix or equivalent directory tree, stripping or translating the drive component before the separator scan even begins. Get that mapping wrong and the entire path is malformed regardless of what the slashes look like. The rewriting, then, is not a single substitution — it is a small pipeline: strip the drive prefix, map it to a real directory, rewrite separators, optionally fold case. All of it invisible, all of it on every file open.


