Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
check if the recentProjects file exists
  • Loading branch information
InventivetalentDev committed Mar 30, 2019
1 parent 4d9c554 commit 08de296
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.js
Expand Up @@ -261,7 +261,11 @@ function checkFileAssociation() {
}

function readRecentProjects() {
fs.readFile(path.join(app.getPath("userData"), "recentProjects.pbd"), function (err, data) {
let recentProjectFile = path.join(app.getPath("userData"), "recentProjects.pbd");
if (!fs.existsSync(recentProjectFile)) {
return;
}
fs.readFile(recentProjectFile, function (err, data) {
if (err) {
console.warn(err);
Sentry.captureException(err);
Expand Down Expand Up @@ -302,7 +306,7 @@ function readRecentProjects() {
}
updateJumpList();
})
})
});
}

function writeRecentProjects() {
Expand Down

0 comments on commit 08de296

Please sign in to comment.