From f623cd12d6a718b4bbdcc35c06035c2c7386def3 Mon Sep 17 00:00:00 2001 From: Filipp Riabchun Date: Wed, 4 Dec 2019 19:42:20 +0100 Subject: [PATCH] Storyshots: escape Windows fileNames Issue: `multisnapshotWithOptions` + CSF doesn't work on Windows --- addons/storyshots/storyshots-core/injectFileName.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/storyshots/storyshots-core/injectFileName.js b/addons/storyshots/storyshots-core/injectFileName.js index 2b2cd5ca7799..c8f946bab571 100644 --- a/addons/storyshots/storyshots-core/injectFileName.js +++ b/addons/storyshots/storyshots-core/injectFileName.js @@ -16,7 +16,7 @@ module.exports = { return `${code}; if(exports.default != null) { exports.default.parameters = exports.default.parameters || {}; - exports.default.parameters.fileName = '${fileName}'; + exports.default.parameters.fileName = '${fileName.replace(/\\/g, '\\\\')}'; } `; },