Skip to content

Commit

Permalink
OSX refactoring 395fb00 missed a std_path stdPath rename
Browse files Browse the repository at this point in the history
  • Loading branch information
did-g committed Nov 9, 2018
1 parent 352f8df commit 8a1fbf1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/weather_routing_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8a1fbf1

Please sign in to comment.