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
271
271
combo . getMod ( ) . getFullName ( ) ,
272
272
combo . getVersion ( ) . getVersionNumber ( ) . toString ( ) + '.zip'
273
273
) , 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
- ) ;
280
274
} catch ( e ) {
281
275
const err = e as Error ;
282
276
callback ( false , new FileWriteError (
@@ -285,6 +279,17 @@ export default class BetterThunderstoreDownloader extends ThunderstoreDownloader
285
279
`Try running ${ ManagerInformation . APP_NAME } as an administrator`
286
280
) ) ;
287
281
}
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
+ }
288
293
}
289
294
290
295
public async isVersionAlreadyDownloaded ( combo : ThunderstoreCombo ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments