mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-07 07:50:27 +00:00
Merge pull request #302 from Wojbie/Wget-binary-mode
Switch wget to use binary mode.
This commit is contained in:
commit
3828750ade
@ -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…
Reference in New Issue
Block a user