1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Electron: Fixes #570: Allow opening files by right-clicking on a resource in macOS

This commit is contained in:
Laurent Cozic 2018-06-11 00:08:57 +01:00
parent b6619b41df
commit df9c1e0aeb

View File

@ -394,7 +394,8 @@ class NoteTextComponent extends React.Component {
const resourcePath = Resource.fullPath(resource); const resourcePath = Resource.fullPath(resource);
menu.append(new MenuItem({label: _('Open...'), click: async () => { menu.append(new MenuItem({label: _('Open...'), click: async () => {
bridge().openExternal(resourcePath); const ok = bridge().openExternal('file://' + resourcePath);
if (!ok) bridge().showErrorMessageBox(_('This file could not be opened: %s', resourcePath));
}})); }}));
menu.append(new MenuItem({label: _('Save as...'), click: async () => { menu.append(new MenuItem({label: _('Save as...'), click: async () => {