rarecoil/unwebpack-sourcemap

Folder names ending with spaces are invalid on Windows

pmularien opened this issue · 0 comments

Hi,

Thanks for putting this together, it works great! I have a small tweak required on Windows to the sanitise_filesystem_name function. I found with one sourcemap I tested, the post-sanitized filename ended up with a trailing space, which is not allowed on Windows.

I created a simple local patch by doing this before the return from this method:

valid_filename = valid_filename.strip()

Let me know if you're happy with this and I can provide a patch.

Cheers,
Peter