Skip to content

Commit

Permalink
Merge pull request #63 from hateofhades/fixing59
Browse files Browse the repository at this point in the history
Fixed trying to open deleted projects on start
  • Loading branch information
alexandruradovici authored Apr 26, 2021
2 parents e17238d + 338e9a5 commit 895ba05
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions source/plugins/projects/projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,13 +1202,18 @@ let projects = {
let project = studio.settings.loadValue('projects', 'currentProject', null);
let file = studio.settings.loadValue('projects', 'currentFile', null);

if (project !== {} && project !== null) {
if(await this.selectCurrentProject(project, false)) {
if (file !== {} && file !== null) {
await this.changeFile(project,file);
}
}

if (project !== null) {
if(await studio.filesystem.pathExists(project.folder)) {
if(await this.selectCurrentProject(project, false)) {
if (file !== null) {
await this.changeFile(project,file);
}
}
} else {
studio.workspace.showDialog(ProjectsLibrary, {width: 1000});
}
} else if(!studio.settings.loadValue('firstrun', 'firstRun', true)) {
studio.workspace.showDialog(ProjectsLibrary, {width: 1000});
}

},
Expand Down

0 comments on commit 895ba05

Please sign in to comment.