#186 fixed ccmsi insufficient space update overwriting config

This commit is contained in:
Mikayla Fischler 2023-03-04 12:49:05 -05:00
parent 94fb02a46b
commit be8e8d767c

View File

@ -20,7 +20,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
local function println(message) print(tostring(message)) end local function println(message) print(tostring(message)) end
local function print(message) term.write(tostring(message)) end local function print(message) term.write(tostring(message)) end
local VERSION = "v0.9g" local VERSION = "v0.9h"
local install_dir = "/.install-cache" local install_dir = "/.install-cache"
local repo_path = "http://raw.githubusercontent.com/MikaylaFischler/cc-mek-scada/" local repo_path = "http://raw.githubusercontent.com/MikaylaFischler/cc-mek-scada/"
@ -497,6 +497,7 @@ elseif mode == "install" or mode == "update" then
term.setTextColor(colors.lightGray) term.setTextColor(colors.lightGray)
local files = file_list[dependency] local files = file_list[dependency]
for _, file in pairs(files) do for _, file in pairs(files) do
if mode == "install" or file ~= config_file then
println("GET " .. file) println("GET " .. file)
local dl, err = http.get(repo_path .. file) local dl, err = http.get(repo_path .. file)
@ -512,6 +513,7 @@ elseif mode == "install" or mode == "update" then
end end
end end
end end
end
if success then if success then
-- if we made it here, then none of the file system functions threw exceptions -- if we made it here, then none of the file system functions threw exceptions