r268 - trunk/scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed May 16 19:39:18 EDT 2007
Author: icculus
Date: 2007-05-16 19:39:18 -0400 (Wed, 16 May 2007)
New Revision: 268
Modified:
trunk/scripts/mojosetup_mainline.lua
Log:
Don't crash if Setup.Package.recommended_destinations is a string instead of a
table of strings.
Modified: trunk/scripts/mojosetup_mainline.lua
===================================================================
--- trunk/scripts/mojosetup_mainline.lua 2007-05-16 09:55:35 UTC (rev 267)
+++ trunk/scripts/mojosetup_mainline.lua 2007-05-16 23:39:18 UTC (rev 268)
@@ -534,9 +534,14 @@
set_destination(install.destination)
else
local recommend = nil
- if install.recommended_destinations ~= nil then
+ local recommended_cfg = install.recommended_destinations
+ if recommended_cfg ~= nil then
+ if type(recommended_cfg) == "string" then
+ recommended_cfg = { recommended_cfg }
+ end
+
recommend = {}
- for i,v in ipairs(install.recommended_destinations) do
+ for i,v in ipairs(recommended_cfg) do
if MojoSetup.platform.isdir(v) then
if MojoSetup.platform.writable(v) then
recommend[#recommend+1] = v .. "/" .. install.id
More information about the mojosetup-commits
mailing list