mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Desktop: Fixes #4958: Display proper error message when JEX file is corrupted
This commit is contained in:
parent
0765cf5955
commit
6959f14a3f
@ -19,10 +19,8 @@ export default class InteropService_Importer_Jex extends InteropService_Importer
|
||||
cwd: tempDir,
|
||||
});
|
||||
} catch (error) {
|
||||
const msg = [`Cannot untar file ${this.sourcePath_}`, error.message];
|
||||
if (error.data) msg.push(JSON.stringify(error.data));
|
||||
const e = new Error(msg.join(': '));
|
||||
throw e;
|
||||
error.message = `Could not decompress "${this.sourcePath_}". The file may be corrupted. Error was: ${error.message}`;
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (!('defaultFolderTitle' in this.options_)) this.options_.defaultFolderTitle = filename(this.sourcePath_);
|
||||
|
Loading…
Reference in New Issue
Block a user