Skip to content

Commit 94e090d

Browse files
committed
Support 0.10-beta directory transition
1 parent fcd27d3 commit 94e090d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/io/file_manager.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,17 @@ void FileManager::checkAndCreateConfigDir()
931931
if(m_user_config_dir.size()>0 && *m_user_config_dir.rbegin()!='/')
932932
m_user_config_dir += "/";
933933

934+
// 0.10 only because wrong config name is used
935+
std::string beta_config_dir = m_user_config_dir + "0.10-beta";
934936
m_user_config_dir += "config-0.10/";
937+
938+
if (fileExists(beta_config_dir))
939+
{
940+
Log::info("FileManager", "Rename 0.10-beta directory to config-0.10 "
941+
"to keep user story mode progress.");
942+
rename(beta_config_dir.c_str(), m_user_config_dir.c_str());
943+
}
944+
935945
if(!checkAndCreateDirectoryP(m_user_config_dir))
936946
{
937947
Log::warn("FileManager", "Can not create config dir '%s', "

0 commit comments

Comments
 (0)