Skip to content

Commit

Permalink
Merge pull request #12 from BohemianCoding/mathieudutour-patch-1
Browse files Browse the repository at this point in the history
only remove folder when it's there
  • Loading branch information
bomberstudios committed Feb 12, 2019
2 parents 7b739d0 + 4dd58c1 commit 9d9fc8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export function onStartup () {
export function onShutdown () {
DataSupplier.deregisterDataSuppliers()
try {
fs.rmdirSync(FOLDER)
if (fs.existsSync(FOLDER)) {
fs.rmdirSync(FOLDER)
}
} catch (err) {
console.error(err)
}
Expand Down

0 comments on commit 9d9fc8e

Please sign in to comment.