Fix opening attachments

This commit is contained in:
Janosch Maier 2021-11-30 17:07:57 +01:00 committed by Ben Gotow
parent 725db1c4e0
commit e6d3290c4e
3 changed files with 3 additions and 3 deletions

View file

@ -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 = (
<a href="" onClick={onViewLog} style={{ paddingLeft: 5 }}>

View file

@ -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') {

View file

@ -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 });