gumyr / cq_warehouse

A cadquery parametric part collection
Apache License 2.0
107 stars 23 forks source link

Improve Windows compatibility in patch building code #54

Closed marked23 closed 2 years ago

marked23 commented 2 years ago

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.