mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-06-25 22:52:51 +00:00
Switch wget to use binary mode.
Allows wget to download all types of files not only text ones.
This commit is contained in:
parent
54d202cf6b
commit
0cc65adff9
@ -28,7 +28,7 @@ local function get( sUrl )
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local response = http.get( sUrl )
|
local response = http.get( sUrl , nil , true )
|
||||||
if not response then
|
if not response then
|
||||||
print( "Failed." )
|
print( "Failed." )
|
||||||
return nil
|
return nil
|
||||||
@ -53,7 +53,7 @@ end
|
|||||||
-- Do the get
|
-- Do the get
|
||||||
local res = get( sUrl )
|
local res = get( sUrl )
|
||||||
if res then
|
if res then
|
||||||
local file = fs.open( sPath, "w" )
|
local file = fs.open( sPath, "wb" )
|
||||||
file.write( res )
|
file.write( res )
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user