Skip to content

Commit

Permalink
CORE: Fix conf file rename when upgrading data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmacleod committed Oct 3, 2022
1 parent 66d7e17 commit 2646f97
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/unity/libinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ int InitUnity()
{
try { fs::rename((oldPath / entry.path().filename()).string(), (GetDataDir() / entry.path().filename()).string() ); } catch(...) {}
}
if (fs::exists(oldPath / "gulden.conf"))
fs::rename((oldPath / "gulden.conf").string(), (GetDataDir() / "munt.conf").string());
if (fs::exists(oldPath / "Gulden.conf"))
fs::rename((oldPath / "Gulden.conf").string(), (GetDataDir() / "munt.conf").string());
boost::filesystem::path newPath(newPathString);
if (fs::exists(GetDataDir() / "gulden.conf"))
fs::rename((GetDataDir() / "gulden.conf").string(), (GetDataDir() / "munt.conf").string());
if (fs::exists(GetDataDir() / "Gulden.conf"))
fs::rename((GetDataDir() / "Gulden.conf").string(), (GetDataDir() / "munt.conf").string());
}
else
{
Expand All @@ -185,10 +186,10 @@ int InitUnity()
{
try { fs::rename((oldPath / entry.path().filename()).string(), (GetDataDir() / entry.path().filename()).string() ); } catch(...) {}
}
if (fs::exists(oldPath / "gulden.conf"))
fs::rename((oldPath / "gulden.conf").string(), (GetDataDir() / "munt.conf").string());
if (fs::exists(oldPath / "Gulden.conf"))
fs::rename((oldPath / "Gulden.conf").string(), (GetDataDir() / "munt.conf").string());
if (fs::exists(GetDataDir() / "gulden.conf"))
fs::rename((GetDataDir() / "gulden.conf").string(), (GetDataDir() / "munt.conf").string());
if (fs::exists(GetDataDir() / "Gulden.conf"))
fs::rename((GetDataDir() / "Gulden.conf").string(), (GetDataDir() / "munt.conf").string());
}
}
}
Expand Down

0 comments on commit 2646f97

Please sign in to comment.