diff --git a/src/Manager.cc b/src/Manager.cc index b77c485c..9aa45a52 100644 --- a/src/Manager.cc +++ b/src/Manager.cc @@ -1096,12 +1096,12 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem) std::string homePath; gz::common::env(IGN_HOMEDIR, homePath); - // TODO(CH3): Deprecated. Remove on ticktock. systemPaths.AddPluginPaths( - gz::common::joinPaths(homePath, ".ignition", "gazebo", "plugins")); + gz::common::joinPaths(homePath, ".gz", "sim", "plugins")); + // TODO(CH3): Deprecated. Remove on ticktock. systemPaths.AddPluginPaths( - gz::common::joinPaths(homePath, ".gz", "sim", "plugins")); + gz::common::joinPaths(homePath, ".ignition", "gazebo", "plugins")); std::string pathToLib; if (common::exists(file)) @@ -1116,6 +1116,13 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem) // GZ_LAUNCH_PLUGIN_PATH systemPaths.SetPluginPathEnv("IGN_LAUNCH_PLUGIN_PATH"); pathToLib = systemPaths.FindSharedLibrary(file); + + if (!pathToLib.empty()) + { + gzwarn << "Found plugin [" << pathToLib + << "] using deprecated environment variable [IGN_LAUNCH_PLUGIN_PATH]." + " Please use [GZ_LAUNCH_PLUGIN_PATH] instead." << std::endl; + } } if (pathToLib.empty()) @@ -1125,12 +1132,6 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem) << "variable.\n"; return; } - else - { - gzwarn << "Found plugin [" << pathToLib - << "] using deprecated environment variable [IGN_LAUNCH_PLUGIN_PATH]." - " Please use [GZ_LAUNCH_PLUGIN_PATH] instead." << std::endl; - } plugin::Loader loader; std::unordered_set localPlugins = loader.LoadLib(pathToLib);