File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -271,12 +271,6 @@ export default class BetterThunderstoreDownloader extends ThunderstoreDownloader
271271 combo . getMod ( ) . getFullName ( ) ,
272272 combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) + '.zip'
273273 ) , data ) ;
274- await ZipExtract . extractAndDelete (
275- path . join ( cacheDirectory , combo . getMod ( ) . getFullName ( ) ) ,
276- combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) + '.zip' ,
277- combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) ,
278- callback
279- ) ;
280274 } catch ( e ) {
281275 const err = e as Error ;
282276 callback ( false , new FileWriteError (
@@ -285,6 +279,17 @@ export default class BetterThunderstoreDownloader extends ThunderstoreDownloader
285279 `Try running ${ ManagerInformation . APP_NAME } as an administrator`
286280 ) ) ;
287281 }
282+
283+ try {
284+ await ZipExtract . extractAndDelete (
285+ path . join ( cacheDirectory , combo . getMod ( ) . getFullName ( ) ) ,
286+ combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) + '.zip' ,
287+ combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) ,
288+ callback
289+ ) ;
290+ } catch ( e ) {
291+ callback ( false , e as R2Error ) ;
292+ }
288293 }
289294
290295 public async isVersionAlreadyDownloaded ( combo : ThunderstoreCombo ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments