r501 - trunk/scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 26 02:59:24 EST 2008


Author: icculus
Date: 2008-02-26 02:59:24 -0500 (Tue, 26 Feb 2008)
New Revision: 501

Modified:
   trunk/scripts/mojosetup_mainline.lua
Log:
Prevent fatal() call when installing control app, if parts of it already exist
 from a previous installation.


Modified: trunk/scripts/mojosetup_mainline.lua
===================================================================
--- trunk/scripts/mojosetup_mainline.lua	2008-02-26 04:50:20 UTC (rev 500)
+++ trunk/scripts/mojosetup_mainline.lua	2008-02-26 07:59:24 UTC (rev 501)
@@ -907,6 +907,7 @@
     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 .. "/"
@@ -919,7 +920,10 @@
 
         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...




More information about the mojosetup-commits mailing list