Join GitHub today
Path operations are not threadsafe on Windows #1436
I wrote a script which does many parallel file operations, and noticed that printing a
The following test script demonstrates the problem. Two tests are run repeatedly, usually succeeding, but often failing. I am comparing the path's basename with the manual basename which is computed by looking at the relative path and removing everything up to "/" or "". The test fails when the relative path is incorrect. Example output is:
A second failure mode is when a relative path is given as "." instead of an actual file path:
The test case is: https://gist.github.com/lefth/8fefc16fa6de74a6c94ea21e84fbe461
Operating system: Windows 10
I cannot reproduce on Linux.