make it work on WINNT with '/reference' on WSL #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Three parts:
re.sub(r'[\uf000-\uf0ff]', lambda m: chr(ord(m.group(0)) & 0xff), filename)
.Apperently WSL1's drvfs will turn incompatible ASCII characters in filenames (
* : ? |
) into unicode\u0xf0XX
.For maximal tarball name preservation I exploded it to a WSL1 path, but read it from native windows, so we need to demangle before processing, but keep mangled name for renaming, so we map both to the new name
os.path
withimport posixpath as urlpath
for most URL path manipulationspathlib.Path
when constructing URLs to the live website.If there's interest (or if it makes my workflow simpler) I'll figure out how to handle a tarball exploded in native WIN32.