From 0cc65adff97bc14d0e8a2587aa73834a24d418a0 Mon Sep 17 00:00:00 2001 From: Wojbie Date: Sat, 3 Jun 2017 13:19:57 +0200 Subject: [PATCH] Switch wget to use binary mode. Allows wget to download all types of files not only text ones. --- .../assets/computercraft/lua/rom/programs/http/wget.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/http/wget.lua b/src/main/resources/assets/computercraft/lua/rom/programs/http/wget.lua index 834e988d3..d64486625 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/http/wget.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/http/wget.lua @@ -28,7 +28,7 @@ local function get( sUrl ) return nil end - local response = http.get( sUrl ) + local response = http.get( sUrl , nil , true ) if not response then print( "Failed." ) return nil @@ -53,7 +53,7 @@ end -- Do the get local res = get( sUrl ) if res then - local file = fs.open( sPath, "w" ) + local file = fs.open( sPath, "wb" ) file.write( res ) file.close()