App: remove code to copy user config from old to new location

This commit is contained in:
wmayer
2021-11-24 19:11:34 +01:00
parent 325c5ec887
commit fea1d3558b

View File

@@ -2893,6 +2893,7 @@ QString getUserHome()
* Returns a directory location where persistent data shared across applications can be stored.
* This method returns the old non-XDG-compliant root path where to store config files and application data.
*/
#if defined(FC_OS_WIN32)
QString getOldGenericDataLocation(QString home)
{
#if defined(FC_OS_WIN32)
@@ -2908,6 +2909,7 @@ QString getOldGenericDataLocation(QString home)
return home;
}
#endif
/*!
* \brief getSubDirectories
@@ -3119,17 +3121,6 @@ void Application::ExtractUserPath()
boost::filesystem::path config = findPath(configHome, customHome, subdirs, true);
mConfig["UserConfigPath"] = pathToString(config) + PATHSEP;
std::vector<std::string> oldsubdirs;
getOldDataLocation(mConfig, oldsubdirs);
boost::filesystem::path appData = findPath(getOldGenericDataLocation(homePath), customData, oldsubdirs, false);
// If in new location user.cfg doesn't exist but in the old location then copy it
boost::filesystem::path oldUsercfg = appData / "user.cfg";
boost::filesystem::path newUsercfg = config / "user.cfg";
if (boost::filesystem::exists(oldUsercfg) && !boost::filesystem::exists(newUsercfg)) {
boost::filesystem::copy(oldUsercfg, newUsercfg);
}
// User cache path
//