asar
asar copied to clipboard
--ordering not working on Windows (forward vs. backward slashes)
glob always returns results with forward-slashes (/), even on Windows (see this issue).
However, when parsing the Windows-generated hint file passed to --ordering, all paths have backward-slashes (\), meaning there will never be any matches, always resulting in 0% coverage.
cc @bengotow, original PR #52
A temporary fix could be to do something like this:
if (path.sep === '\\') {
str = str.replace(/\\/g, '/')
}
ordering.push(str)
at https://github.com/electron/asar/blob/master/lib/asar.js#L78.
Tested and it does the job, I wouldn't mind creating the PR if you're good with that @bengotow.
Does this problem still exist on Windows platform ?