Skip to content

Commit

Permalink
fix for older devices without a local manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisisnate committed Aug 23, 2017
1 parent 7a06c53 commit 4104dbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"src/http_index.html.gz":"e1149f19e459500c32273dbdacbcfa978db16364",
"src/httpd_req.lua":"80053674f20f087e58e1cfd490fc71e6cdd92acf",
"src/httpd_res.lua":"7226f19699168e171970cda73b953a49450b7aa8",
"src/init.lua":"a24bbe72c66f4836b012a878177f65f4b9bd3a0d",
"src/init.lua":"cc93595d2dfdeb609d78c666f9ed16aed86b6ada",
"src/led_flip.lua":"590e7be1afe686f4213d097d0e9dba9e7a3910a0",
"src/manifest.json":"686581e56994fb7714945d19204428c944e53ed3",
"src/manifest.json":"9a56136c34249f85175b2f1c6e20be0bc9d356c1",
"src/sensors.lua":"d0d94fa73f713dcf2c517da9262f59f306b81d2b",
"src/server.lua":"c7f09f0a626587ced6399948fc1719dd248f3f01",
"src/server_device.lua":"dca5e6501b4836d120cadc20538999387c9c54d1",
Expand All @@ -18,10 +18,10 @@
"src/smartthings.lua":"ae11130360416aec5c2505c06850c5a4cd0449da",
"src/ssdp.lua":"f2776ae2c333093e3d954950f13d77b3d880aee1",
"src/start.lua":"af90c766d9afa65c6cbcddacb7ab91124b3598c6",
"src/update.lua":"b7274646098895b2a95c1ac0530c0c08780681a7",
"src/update_manifest.lua":"0c113061f43ed2d367d67ea254c6dc81c1a2ec73",
"src/update_process.lua":"ff202f244409fcdbc706989c2977d189ecfe894c",
"src/update.lua":"3d2f52af3873583b08e387759b9e32b4f659c357",
"src/update_manifest.lua":"dddbf60e48a50ab0bbafa2ad95a4f4a9f448b3a4",
"src/update_process.lua":"079934b760007888f338da007599962ea672afa1",
"src/variables_build.lua":"0029cb028698822ee981c35bcf84710c19e21486",
"src/variables_set.lua":"2c2d9c13c8acb577d80f40e4b513c7cd23ffdd1f",
"updated_at":"2017-08-23:07:21:07"
"updated_at":"2017-08-23:18:45:10"
}
2 changes: 1 addition & 1 deletion src/update_manifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local download_new_manifest = function()
local new_manifest = cjson.decode(data)
print("Heap: ", node.heap(), "downloaded updated manifest.json")
local file_size = file.list()['manifest.json']
local current_manifest
local current_manifest = {}

-- open the existing manifest.json on the device for comparing file SHAs
if file.open("manifest.json") then
Expand Down
2 changes: 1 addition & 1 deletion src/update_process.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local proceed
local function getHeaderValue(line, headerPattern)
local l1 = string.match(line, headerPattern .. ": (.*)")
local l1 = string.match(line, "^" .. headerPattern .. ": (.*)")
if l1 then
local l2 = string.sub(l1, 1, ( string.find(l1, "\r\n") - 1 ))
return l2
Expand Down

0 comments on commit 4104dbf

Please sign in to comment.