fix(macOS): Writable check on debug archive destination directory.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
This commit is contained in:
Iva Horn
2025-11-07 14:44:46 +01:00
parent c2e01d4930
commit b6cfd6d683
2 changed files with 9 additions and 15 deletions

View File

@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/nextcloud/NextcloudFileProviderKit.git",
"state" : {
"revision" : "3ff19ffdda3361ec3446266aa757653a8b272898",
"version" : "3.2.11"
"revision" : "cb9c976ccc040946067f98079ca9091d8c6cb05b",
"version" : "4.0.0"
}
},
{
@ -33,8 +33,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/nextcloud/NextcloudKit",
"state" : {
"revision" : "67f3cf59a5e6ae11c061815a05197e2b2cbcb3ad",
"version" : "7.2.2"
"revision" : "8ac6f9e08d112b51a9b7a7189fa144009a6f382d",
"version" : "7.2.3"
}
},
{

View File

@ -121,24 +121,18 @@ QVector<ZipEntry> createDebugArchiveFileList()
bool createDebugArchive(const QString &filename)
{
const auto fileInfo = QFileInfo(filename);
const auto dirInfo = QFileInfo(fileInfo.dir().absolutePath());
if (!dirInfo.isWritable()) {
const auto entries = createDebugArchiveFileList();
KZip zip(filename);
if (!zip.open(QIODevice::WriteOnly)) {
QMessageBox::critical(
nullptr,
QObject::tr("Failed to create debug archive"),
QObject::tr("Could not create debug archive in selected location!"),
QMessageBox::Ok
);
return false;
}
const auto entries = createDebugArchiveFileList();
KZip zip(filename);
const auto opennResult = zip.open(QIODevice::WriteOnly);
if (!opennResult) {
qCWarning(lcGeneralSettings) << "failed to open zip archive to create a debug archive";
return false;
}