Skip to content

Commit 1c08b3a

Browse files
authored
Merge pull request electron#232 from electron/open-external
Use shell.openExternal instead of shell.openItem
2 parents 52bc69c + 20e06dd commit 1c08b3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main-process/media/pdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ipc.on('print-to-pdf', function (event) {
1616
if (error) {
1717
throw error
1818
}
19-
shell.openItem(pdfPath)
19+
shell.openExternal('file://' + pdfPath)
2020
event.sender.send('wrote-pdf', pdfPath)
2121
})
2222
})

renderer-process/media/desktop-capturer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ screenshot.addEventListener('click', function (event) {
2424

2525
fs.writeFile(screenshotPath, source.thumbnail.toPng(), function (error) {
2626
if (error) return console.log(error)
27-
shell.openItem(screenshotPath)
27+
shell.openExternal('file://' + screenshotPath)
2828
const message = `Saved screenshot to: ${screenshotPath}`
2929
screenshotMsg.textContent = message
3030
})

0 commit comments

Comments
 (0)