mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix wrong detectiion of current config file as a config migration
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
fa90a876b4
commit
fb062f2dd7
@ -157,11 +157,12 @@ bool Application::configVersionMigration()
|
||||
const auto anyConfigFileNameList = configDir.entryInfoList({"*.cfg"}, QDir::Files);
|
||||
for (const auto &oldConfig : anyConfigFileNameList) {
|
||||
const auto oldConfigFileName = oldConfig.fileName();
|
||||
const auto oldConfigFilePath = oldConfig.filePath();
|
||||
const auto newConfigFileName = configFile.configFile();
|
||||
backupFilesList.append(configFile.backup(oldConfigFileName));
|
||||
if (oldConfigFileName != newConfigFileName) {
|
||||
if (!QFile::rename(oldConfig.filePath(), newConfigFileName)) {
|
||||
qCWarning(lcApplication) << "Failed to rename configuration file from" << oldConfigFileName << "to" << newConfigFileName;
|
||||
if (oldConfigFilePath != newConfigFileName) {
|
||||
if (!QFile::rename(oldConfigFilePath, newConfigFileName)) {
|
||||
qCWarning(lcApplication) << "Failed to rename configuration file from" << oldConfigFilePath << "to" << newConfigFileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user