From e6d3290c4e47025b6a79a34a9d21c6e4bb4c9cc0 Mon Sep 17 00:00:00 2001 From: Janosch Maier Date: Tue, 30 Nov 2021 17:07:57 +0100 Subject: [PATCH] Fix opening attachments --- app/internal_packages/onboarding/lib/form-error-message.tsx | 2 +- app/src/browser/application.ts | 2 +- app/src/flux/stores/attachment-store.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/internal_packages/onboarding/lib/form-error-message.tsx b/app/internal_packages/onboarding/lib/form-error-message.tsx index ed15db0d4..5a508d103 100644 --- a/app/internal_packages/onboarding/lib/form-error-message.tsx +++ b/app/internal_packages/onboarding/lib/form-error-message.tsx @@ -21,7 +21,7 @@ const FormErrorMessage = (props: FormErrorProps) => { const onViewLog = () => { const logPath = temp.path({ suffix: '.log' }); fs.writeFileSync(logPath, log); - shell.openItem(logPath); + shell.openPath(logPath); }; rawLogLink = ( diff --git a/app/src/browser/application.ts b/app/src/browser/application.ts index d5b8cf363..cc716f0b3 100644 --- a/app/src/browser/application.ts +++ b/app/src/browser/application.ts @@ -453,7 +453,7 @@ export default class Application extends EventEmitter { }); this.on('application:view-license', () => { - shell.openItem(path.join(this.resourcePath, 'static', 'all_licenses.html')); + shell.openPath(path.join(this.resourcePath, 'static', 'all_licenses.html')); }); if (process.platform === 'darwin') { diff --git a/app/src/flux/stores/attachment-store.ts b/app/src/flux/stores/attachment-store.ts index 64e15f7c9..6894e0a5c 100644 --- a/app/src/flux/stores/attachment-store.ts +++ b/app/src/flux/stores/attachment-store.ts @@ -159,7 +159,7 @@ class AttachmentStore extends MailspringStore { _fetchAndOpen = file => { return this._prepareAndResolveFilePath(file) - .then(filePath => shell.openItem(filePath)) + .then(filePath => shell.openPath(filePath)) .catch(this._catchFSErrors) .catch(error => { this._presentError({ file, error });