From 8a1fbf1ba584fa99acd411635abb34cffdd11d29 Mon Sep 17 00:00:00 2001 From: didier Date: Fri, 9 Nov 2018 08:36:02 +0100 Subject: [PATCH] OSX refactoring 395fb00f missed a std_path stdPath rename --- src/weather_routing_pi.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/weather_routing_pi.cpp b/src/weather_routing_pi.cpp index 4e6db2b0..8cb95c23 100644 --- a/src/weather_routing_pi.cpp +++ b/src/weather_routing_pi.cpp @@ -511,10 +511,15 @@ wxString weather_routing_pi::StandardPath() #ifdef __WXOSX__ // Compatibility with pre-OCPN-4.2; move config dir to // ~/Library/Preferences/opencpn if it exists - wxString oldPath = (std_path.GetUserConfigDir() + s + _T("plugins") + s + _T("weather_routing")); - if (wxDirExists(oldPath) && !wxDirExists(stdPath)) { - wxLogMessage("weather_routing_pi: moving config dir %s to %s", oldPath, stdPath); - wxRenameFile(oldPath, stdPath); + { + wxStandardPathsBase& std_path = wxStandardPathsBase::Get(); + wxString s = wxFileName::GetPathSeparator(); + // should be ~/Library/Preferences/opencpn + wxString oldPath = (std_path.GetUserConfigDir() +s + _T("plugins") +s + _T("weather_routing")); + if (wxDirExists(oldPath) && !wxDirExists(stdPath)) { + wxLogMessage("weather_routing_pi: moving config dir %s to %s", oldPath, stdPath); + wxRenameFile(oldPath, stdPath); + } } #endif