mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-11 09:10:51 +01:00
feat: delete dump file when the export is canceled
This commit is contained in:
parent
8cf738bac8
commit
d25c62b4da
@ -210,6 +210,10 @@ export default connections => {
|
||||
resolve({ cancelled: exporter.isCancelled });
|
||||
});
|
||||
|
||||
exporter.once('cancel', () => {
|
||||
fs.unlinkSync(exporter.outputFile);
|
||||
});
|
||||
|
||||
exporter.on('progress', state => {
|
||||
event.sender.send('export-progress', state);
|
||||
});
|
||||
|
@ -38,6 +38,10 @@ export class BaseExporter extends EventEmitter {
|
||||
return this._isCancelled;
|
||||
}
|
||||
|
||||
get outputFile () {
|
||||
return this._options.outputFile;
|
||||
}
|
||||
|
||||
outputFileExists () {
|
||||
return fs.existsSync(this._options.outputFile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user