Skip to content
代码片段 群组 项目
提交 aaa1322d 编辑于 作者: A.ghasemkhani's avatar A.ghasemkhani 提交者: Bharat Raju
浏览文件

chore: fix comment message

上级 89d52dd4
No related branches found
No related tags found
无相关合并请求
...@@ -118,9 +118,22 @@ function openFileDialogAndReportResult( ...@@ -118,9 +118,22 @@ function openFileDialogAndReportResult(
p.defaultPath = options.defaultPath p.defaultPath = options.defaultPath
dialog.showOpenDialog(browserWindow, p).then((result) => { dialog.showOpenDialog(browserWindow, p).then((result) => {
if (!result.canceled) { if (!result.canceled) {
let paths : string[] = [];
// check if application is running on Windows standalone mode, then replace the backward slashs with forward slash
// otherwise it will throw a JSON syntax error
if(process.platform == "win32"){
result.filePaths.forEach(path => {
paths.push(
path.replace(/\\/g, '/')
);
})
}else{
paths = result.filePaths
}
let output = { let output = {
context: options.context, context: options.context,
filePaths: result.filePaths, filePaths: paths,
} }
browserApi.reportFiles(browserWindow, output) browserApi.reportFiles(browserWindow, output)
} }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册