mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Directly bundle macOS vfs logs within standard debug archive
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f1c6b65265
commit
e78353939f
@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "generalsettings.h"
|
||||
#include "macOS/fileprovider.h"
|
||||
#include "ui_generalsettings.h"
|
||||
|
||||
#include "theme.h"
|
||||
@ -31,6 +32,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_FILE_PROVIDER_MODULE
|
||||
#include "macOS/fileprovidersettingscontroller.h"
|
||||
#endif
|
||||
|
||||
#include "ignorelisteditor.h"
|
||||
#include "common/utility.h"
|
||||
#include "logger.h"
|
||||
@ -113,6 +118,23 @@ QVector<ZipEntry> createDebugArchiveFileList()
|
||||
std::copy(std::cbegin(newEntries), std::cend(newEntries), std::back_inserter(list));
|
||||
});
|
||||
|
||||
#ifdef BUILD_FILE_PROVIDER_MODULE
|
||||
|
||||
const auto fileProvider = OCC::Mac::FileProvider::instance();
|
||||
if (fileProvider && fileProvider->fileProviderAvailable()) {
|
||||
const auto tempDir = QTemporaryDir();
|
||||
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 vfsLogPath = tempDir.filePath(vfsLogFilename);
|
||||
xpc->createDebugArchiveForExtension(accountUserIdAtHost, vfsLogPath);
|
||||
list.append(fileInfoToZipEntry(QFileInfo(vfsLogPath)));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user