Merge pull request #823 from vector-im/fix-tmp-dir

Fix .tmp being created in `/`
This commit is contained in:
R Midhun Suresh 2022-08-01 16:16:35 +05:30 committed by GitHub
commit f7839135a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ export function buildColorizedSVG(svgLocation, primaryColor, secondaryColor) {
const coloredSVGCode = getColoredSvgString(svgCode, primaryColor, secondaryColor);
const fileName = svgLocation.match(/.+[/\\](.+\.svg)/)[1];
const outputName = `${fileName.substring(0, fileName.length - 4)}-${createHash(coloredSVGCode)}.svg`;
const outputPath = resolve(__dirname, "../../.tmp");
const outputPath = resolve(__dirname, "./.tmp");
try {
mkdirSync(outputPath);
}