mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-1732 Checking for the existance of file before attempting to open it
This commit is contained in:
parent
119da410dc
commit
f6c7761f87
@ -358,7 +358,10 @@ export const downloadManagerAction = (type, filePath): void => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'open') {
|
if (type === 'open') {
|
||||||
const openResponse = electron.shell.openItem(`${filePath}`);
|
let openResponse = fs.existsSync(`${filePath}`);
|
||||||
|
if (openResponse) {
|
||||||
|
openResponse = electron.shell.openItem(`${filePath}`);
|
||||||
|
}
|
||||||
if (!openResponse && focusedWindow && !focusedWindow.isDestroyed()) {
|
if (!openResponse && focusedWindow && !focusedWindow.isDestroyed()) {
|
||||||
electron.dialog.showMessageBox(focusedWindow, {
|
electron.dialog.showMessageBox(focusedWindow, {
|
||||||
message,
|
message,
|
||||||
|
Loading…
Reference in New Issue
Block a user