write modinfo.json after installing mod

This commit is contained in:
SpikeHD
2022-07-24 20:03:16 -07:00
parent 5077c19fdc
commit 552d612e7c
6 changed files with 84 additions and 36 deletions

View File

@@ -45,11 +45,10 @@ export default class Downloads extends React.Component<IProps, IState> {
async downloadGame() {
const folder = this.state.gameDownloadFolder
this.props.downloadManager.addDownload(GAME_DOWNLOAD, folder + '\\game.zip', () => {
unzip(folder + '\\game.zip', folder + '\\', true, () => {
this.setState({
gameDownloading: false,
})
this.props.downloadManager.addDownload(GAME_DOWNLOAD, folder + '\\game.zip', async () => {
await unzip(folder + '\\game.zip', folder + '\\', true)
this.setState({
gameDownloading: false,
})
})