File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ import { lt as semverLt } from 'semver'
50
50
import { createAbortController } from '../utils/aborthandler/aborthandler'
51
51
import { gameManagerMap } from '../storeManagers'
52
52
import { sendFrontendMessage } from '../main_window'
53
+ import {
54
+ DAYS ,
55
+ downloadFile as downloadFileInet
56
+ } from '../utils/inet/downloader'
53
57
54
58
interface Tool {
55
59
name : string
@@ -443,9 +447,11 @@ export const Winetricks = {
443
447
444
448
try {
445
449
logInfo ( 'Downloading Winetricks' , LogPrefix . WineTricks )
446
- const res = await axios . get ( url , { timeout : 1000 } )
447
- const file = res . data
448
- writeFileSync ( path , file )
450
+ await downloadFileInet ( url , {
451
+ writeToFile : path ,
452
+ maxCache : 7 * DAYS ,
453
+ axiosConfig : { responseType : 'text' }
454
+ } )
449
455
await chmod ( path , 0o755 )
450
456
return
451
457
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments