I have a suspicion that this fix is more complicated than it needs to be.
I wouldn't be surprised if this accidently breaks Linux compatibility (though I tried to avoid that).
The os library is doing us some anti-favors by correctly formatting Windows paths, which then need to be unconverted when running diff and patch.
I added usage of pathlib, which is missing a feature to correctly format drive-letters in posix paths on Windows. So there's a method to compensate for that too.
I have a suspicion that this fix is more complicated than it needs to be. I wouldn't be surprised if this accidently breaks Linux compatibility (though I tried to avoid that). The os library is doing us some anti-favors by correctly formatting Windows paths, which then need to be unconverted when running diff and patch. I added usage of pathlib, which is missing a feature to correctly format drive-letters in posix paths on Windows. So there's a method to compensate for that too.