Skip to content

Commit

Permalink
Throw error if folder creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucki committed Feb 26, 2023
1 parent dc13f69 commit e9b1257
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/historyMenuElements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ const HistoryElement = GObject.registerClass({
if (!targetFolder.make_directory_with_parents(null))
throw new Error('Could not create directories.');
} catch (error) {
if (error === Gio.IOErrorEnum.EXISTS) { /** noop */ }
if (error === Gio.IOErrorEnum.EXISTS) // noop
this._logger.debug('Folder already exists.');
else // escalate
throw error;
}

// This function was rewritten by Gio._promisify
Expand Down

0 comments on commit e9b1257

Please sign in to comment.