Browse Source
Merge pull request #1260 from gre/fix-filepath-replace
Fixes filepathReplace
master
Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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) |
|
|
|