Skip to content

Commit

Permalink
Remove no longer existing account id from configured vfs accounts list
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Jun 25, 2024
1 parent b7e99cf commit a0076e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/macOS/fileproviderdomainmanager_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,18 @@ QStringList configuredDomainIds() const
auto configuredDomains = d->configuredDomainIds();

for (const auto &accountUserIdAtHost : vfsEnabledAccounts) {
// If the domain has already been set up for this account, then don't set it up again
if (configuredDomains.contains(accountUserIdAtHost)) {
configuredDomains.removeAll(accountUserIdAtHost);
continue;
}

if (const auto accountState = AccountManager::instance()->accountFromUserId(accountUserIdAtHost)) {
addFileProviderDomainForAccount(accountState.data());
} else {
qCWarning(lcMacFileProviderDomainManager) << "Could not find account for file provider domain:" << accountUserIdAtHost
<< "removing account from list of vfs-enabled accounts.";
FileProviderSettingsController::instance()->setVfsEnabledForAccount(accountUserIdAtHost, false);
}
}

Expand Down

0 comments on commit a0076e8

Please sign in to comment.