From 41b78ce1505aced494f588d6f3591c8af68a8bbe Mon Sep 17 00:00:00 2001 From: "Rebecca N. Palmer" Date: Sun, 21 Feb 2016 20:25:02 +0000 Subject: [PATCH] Nasal security: allow reading explicit --terrasync-dir (but not /sim/terrasync/scenery-dir - https://bugs.debian.org/780716 ) Needed for animated jetways: https://sourceforge.net/p/flightgear/mailman/message/34870606/ --- src/Main/options.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 3c412ca68..3c4b36f36 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -855,6 +855,14 @@ fgOptFgScenery( const char *arg ) return FG_OPTIONS_OK; } +static int +fgOptTerrasyncDir( const char *arg ) +{ + globals->append_fg_scenery(arg, true); + fgSetString("/sim/terrasync/scenery-dir", arg); + return FG_OPTIONS_OK; +} + static int fgOptFov( const char *arg ) { @@ -1620,7 +1628,7 @@ struct OptionDesc { {"materials-file", true, OPTION_STRING, "/sim/rendering/materials-file", false, "", 0 }, {"disable-terrasync", false, OPTION_BOOL, "/sim/terrasync/enabled", false, "", 0 }, {"enable-terrasync", false, OPTION_BOOL, "/sim/terrasync/enabled", true, "", 0 }, - {"terrasync-dir", true, OPTION_STRING, "/sim/terrasync/scenery-dir", false, "", 0 }, + {"terrasync-dir", true, OPTION_FUNC, "", false, "", fgOptTerrasyncDir }, {"download-dir", true, OPTION_STRING, "/sim/paths/download-dir", false, "", 0 }, {"geometry", true, OPTION_FUNC, "", false, "", fgOptGeometry }, {"bpp", true, OPTION_FUNC, "", false, "", fgOptBpp }, -- 2.39.5