Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly sanitize Windows reserved names in evaluator paths (#2964)
In case a segment path matches one of the reserved name of the Windows filesystem namespace, we insert a `~` directly after the offending segment part. Here is a excerpt from an official [Win32 documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#naming-conventions): > * Do not use the following reserved names for the name of a file: > > CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM¹, COM², COM³, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT¹, LPT², and LPT³. Also avoid these names followed immediately by an extension; for example, NUL.txt and NUL.tar.gz are both equivalent to NUL. For more information, see [Namespaces](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#win32-file-namespaces). We do the insertions on all platforms, not only Windows, for consistency of the `out/` folder. Fix #2961 Pull request: #2964
- Loading branch information