Make variables in folderman::setupfoldermigration actually match what they are holding

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-04-30 18:30:55 +08:00
parent be4b8066c3
commit 6cd68b8632

View file

@ -352,12 +352,12 @@ int FolderMan::setupFoldersMigration()
QDir dir(_folderConfigPath);
//We need to include hidden files just in case the alias starts with '.'
dir.setFilter(QDir::Files | QDir::Hidden);
const auto list = dir.entryList();
const auto dirFiles = dir.entryList();
// Normally there should be only one account when migrating.
// Normally there should be only one account when migrating. TODO: Change
const auto accountState = AccountManager::instance()->accounts().value(0).data();
for (const auto &alias : list) {
const auto folder = setupFolderFromOldConfigFile(alias, accountState);
for (const auto &fileName : dirFiles) {
const auto folder = setupFolderFromOldConfigFile(fileName, accountState);
if (folder) {
scheduleFolder(folder);
emit folderSyncStateChange(folder);