[mojosetup] [4/13] During upgrades, don't ask for the permission to overwrite files installed by the previous version.

Francois Gouget fgouget at codeweavers.com
Mon May 21 13:57:48 EDT 2012


---

This depends on the content of the old manifest and thus depends on 
patch 2.

 scripts/mojosetup_mainline.lua |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/mojosetup_mainline.lua b/scripts/mojosetup_mainline.lua
index 758e9e0..37f0297 100644
--- a/scripts/mojosetup_mainline.lua
+++ b/scripts/mojosetup_mainline.lua
@@ -533,7 +533,9 @@ local function permit_write(dest, entinfo, file)
         if entinfo.type == "dir" then
             allowoverwrite = true
         else
-            if MojoSetup.forceoverwrite ~= nil then
+            if MojoSetup.oldfiles[entinfo.filename] ~= nil then
+                allowoverwrite = true
+            elseif MojoSetup.forceoverwrite ~= nil then
                 allowoverwrite = MojoSetup.forceoverwrite
             else
                 -- !!! FIXME: option/package-wide overwrite?
-- 
1.7.10


More information about the mojosetup mailing list