From 3f0e75b9442a72aea3792171d5be91381adf0a7e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 7 Nov 2024 02:07:56 +0900 Subject: [PATCH] Just use davUser as account identifier for macOS log filename Signed-off-by: Claudio Cambra --- src/gui/generalsettings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index f589fb3c59eaf..a1149190a8aee 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -150,7 +150,13 @@ bool createDebugArchive(const QString &filename) const auto xpc = fileProvider->xpc(); const auto vfsAccounts = OCC::Mac::FileProviderSettingsController::instance()->vfsEnabledAccounts(); for (const auto &accountUserIdAtHost : vfsAccounts) { - const auto vfsLogFilename = QStringLiteral("macOS_vfs_%1.log").arg(accountUserIdAtHost); + const auto accountState = OCC::AccountManager::instance()->accountFromUserId(accountUserIdAtHost); + if (!accountState) { + qWarning() << "Could not find account for" << accountUserIdAtHost; + continue; + } + const auto account = accountState->account(); + const auto vfsLogFilename = QStringLiteral("macOS_vfs_%1.log").arg(account->davUser()); const auto vfsLogPath = tempDir.filePath(vfsLogFilename); xpc->createDebugArchiveForExtension(accountUserIdAtHost, vfsLogPath); zip.addLocalFile(vfsLogPath, vfsLogFilename);