summaryrefslogtreecommitdiff
path: root/lua_scripts
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2008-11-26 20:24:18 +0200
committerLauri Leukkunen <lle@rahina.org>2008-12-07 04:32:47 +0200
commit414f63552e0a36483781c257c20e0920b9fd1066 (patch)
treebf092eee68f59deefcf7f0cbd0379116a9b7f59a /lua_scripts
parente966686b183ce16008582a58b24f50f2bfc21a3d (diff)
Bugfix for persistent sessions with multiple mapping modes vs. /sb2/wrappers
- A persistent session with multiple modes (e.g. "devel" and "emulate") mapped /sb2/wrappers to a wrong destination for the secondary modes
Diffstat (limited to 'lua_scripts')
-rw-r--r--lua_scripts/mapping.lua2
-rw-r--r--lua_scripts/pathmaps/devel/00_default.lua2
-rw-r--r--lua_scripts/pathmaps/emulate/00_default.lua2
-rw-r--r--lua_scripts/pathmaps/tools/00_default.lua2
4 files changed, 5 insertions, 3 deletions
diff --git a/lua_scripts/mapping.lua b/lua_scripts/mapping.lua
index 2c66cd9..244ab7c 100644
--- a/lua_scripts/mapping.lua
+++ b/lua_scripts/mapping.lua
@@ -8,9 +8,11 @@ local forced_modename = sb.get_forced_mapmode()
if forced_modename == nil then
rule_file_path = session_dir .. "/rules/Default.lua"
rev_rule_file_path = session_dir .. "/rev_rules/Default.lua"
+ active_mapmode = sbox_mapmode
else
rule_file_path = session_dir .. "/rules/" .. forced_modename .. ".lua"
rev_rule_file_path = session_dir .. "/rev_rules/" .. forced_modename .. ".lua"
+ active_mapmode = forced_modename
end
function basename(path)
diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua
index 1876b70..7010ba6 100644
--- a/lua_scripts/pathmaps/devel/00_default.lua
+++ b/lua_scripts/pathmaps/devel/00_default.lua
@@ -116,7 +116,7 @@ simple_chain = {
-- 2. Development environment special destinations:
{prefix = "/sb2/wrappers",
- replace_by = session_dir .. "/wrappers." .. sbox_mapmode,
+ replace_by = session_dir .. "/wrappers." .. active_mapmode,
readonly = true},
{prefix = "/sb2/scripts",
diff --git a/lua_scripts/pathmaps/emulate/00_default.lua b/lua_scripts/pathmaps/emulate/00_default.lua
index 371bf43..530db6f 100644
--- a/lua_scripts/pathmaps/emulate/00_default.lua
+++ b/lua_scripts/pathmaps/emulate/00_default.lua
@@ -58,7 +58,7 @@ mapall_chain = {
-- Gdb needs some special parameters before it
-- can be run so we wrap it.
{prefix = "/sb2/wrappers",
- replace_by = session_dir .. "/wrappers." .. sbox_mapmode,
+ replace_by = session_dir .. "/wrappers." .. active_mapmode,
readonly = true},
-- Scratchbox 1 compatibility rules:
diff --git a/lua_scripts/pathmaps/tools/00_default.lua b/lua_scripts/pathmaps/tools/00_default.lua
index 894d601..29b3b23 100644
--- a/lua_scripts/pathmaps/tools/00_default.lua
+++ b/lua_scripts/pathmaps/tools/00_default.lua
@@ -42,7 +42,7 @@ mapall_chain = {
-- ldconfig is static binary, and needs to be wrapped
{prefix = "/sb2/wrappers",
- replace_by = session_dir .. "/wrappers." .. sbox_mapmode,
+ replace_by = session_dir .. "/wrappers." .. active_mapmode,
readonly = true},
--