mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-09 22:55:12 +00:00
Fix some path math on Windows
This commit is contained in:
parent
d71e84b790
commit
7418815637
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ module.exports = {
|
||||||
* @return {string} The returned paths will look like `img/warning.1234567.svg`.
|
* @return {string} The returned paths will look like `img/warning.1234567.svg`.
|
||||||
*/
|
*/
|
||||||
function getImgOutputPath(url, resourcePath) {
|
function getImgOutputPath(url, resourcePath) {
|
||||||
const prefix = /^.*\/res\//;
|
const prefix = /^.*[/\\]res[/\\]/;
|
||||||
const outputDir = path.dirname(resourcePath).replace(prefix, "");
|
const outputDir = path.dirname(resourcePath).replace(prefix, "");
|
||||||
return path.join(outputDir, path.basename(url));
|
return path.join(outputDir, path.basename(url));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue