Browse Source

Merge pull request #1260 from gre/fix-filepath-replace

Fixes filepathReplace
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
58f3612253
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/helpers/anonymizer.js

2
src/helpers/anonymizer.js

@ -21,7 +21,7 @@ function filepathReplace(path: string) {
if (!path) return path
const replaced = Object.keys(basePaths).reduce((path, name) => {
const p = basePaths[name]
return replaced
return path
.replace(p, name) // normal replace of the path
.replace(encodeURI(p.replace(/\\/g, '/')), name) // replace of the URI version of the path (that are in file:///)
}, path)

Loading…
Cancel
Save