Skip to content

Commit

Permalink
show error when not loading a zip (#4531)
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf authored and mattgodbolt committed Jan 24, 2023
1 parent 111e932 commit 4e2802a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions static/panes/tree.ts
Expand Up @@ -573,6 +573,11 @@ export class Tree {
}

private async openZipFile(htmlfile) {
if (!htmlfile.name.toLowerCase().endsWith('.zip')) {
this.alertSystem.alert('Load project file', 'Projects can only be loaded from .zip files');
return;
}

this.multifileService.forEachFile((file: MultifileFile) => {
this.removeFile(file.fileId);
});
Expand Down

0 comments on commit 4e2802a

Please sign in to comment.