diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index 8e361e84..c01928e8 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -53,9 +53,10 @@ using std::string; using simgear::strutils::starts_with; -// For SGPath::validate() -static string_list read_allowed_paths; -static string_list write_allowed_paths; +// Static data members used by SGPath::addAllowedPathPattern(), +// SGPath::validate(), etc. +string_list SGPath::read_allowed_paths; +string_list SGPath::write_allowed_paths; /** * define directory path separators diff --git a/simgear/misc/sg_path.hxx b/simgear/misc/sg_path.hxx index d11ea01a..973d796e 100644 --- a/simgear/misc/sg_path.hxx +++ b/simgear/misc/sg_path.hxx @@ -391,6 +391,10 @@ private: mutable bool _existsCached : 1; ///< only used on Windows mutable time_t _modTime; mutable size_t _size; + + // For addAllowedPathPattern(), validate(), etc. + static string_list read_allowed_paths; + static string_list write_allowed_paths; }; // Other comparison operators are in the class definition block