Skip to content

Commit

Permalink
Prevent fatal() call when installing control app, if parts of it alre…
Browse files Browse the repository at this point in the history
…ady exist

 from a previous installation.
  • Loading branch information
icculus committed Feb 26, 2008
1 parent eaae940 commit 7c41b08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/mojosetup_mainline.lua
Expand Up @@ -907,6 +907,7 @@ local function install_control_app(desc, key)
while ent ~= nil do
-- Make sure this is in a directory we want to write out...
local should_write = false

if (ent.filename ~= nil) and (ent.filename ~= "") then
for i,dir in ipairs(needdirs) do
local clipdir = "^" .. dir .. "/"
Expand All @@ -919,7 +920,10 @@ local function install_control_app(desc, key)

if should_write then
dst = MojoSetup.controldir .. "/" .. ent.filename
install_archive_entity(dst, ent, base, desc, key)
-- don't overwrite preexisting stuff.
if not MojoSetup.platform.exists(dst) then
install_archive_entity(dst, ent, base, desc, key)
end
end

-- and check the next entry in the archive...
Expand Down

0 comments on commit 7c41b08

Please sign in to comment.