Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <fmueller@owncloud.com>2022-05-19 19:10:23 +0300
committerFabian Müller <fmueller@owncloud.com>2022-05-19 19:10:23 +0300
commit955520025a6b8217856244c2d73d88944e10a451 (patch)
tree5d45fb01fe86b7b5f9d947088c860083bd7bf62a
parent1b87c9eabc81570fbc41ede6a8b8c930243db9d9 (diff)
Fix object path passed to DBus by libcloudproviderswork/fix-cloudproviders-crash
-rw-r--r--src/gui/libcloudproviders/libcloudproviders.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/libcloudproviders/libcloudproviders.cpp b/src/gui/libcloudproviders/libcloudproviders.cpp
index d9a2e46ce..25cb6bf88 100644
--- a/src/gui/libcloudproviders/libcloudproviders.cpp
+++ b/src/gui/libcloudproviders/libcloudproviders.cpp
@@ -126,7 +126,10 @@ void LibCloudProvidersPrivate::exportFolder(Folder *folder)
g_error_free(error);
}
- auto exporter = cloud_providers_account_exporter_new(_exporter, folder->id().constData());
+ // DBus object paths must not contain characters other than [A-Z][a-z][0-9]_, see g_variant_is_object_path
+ const QByteArray dBusCompatibleFolderId = folder->id().replace("-", "").constData();
+
+ auto exporter = cloud_providers_account_exporter_new(_exporter, dBusCompatibleFolderId);
cloud_providers_account_exporter_set_path(exporter, folder->path().toUtf8().constData());
cloud_providers_account_exporter_set_icon(exporter, icon);
cloud_providers_account_exporter_set_status(exporter, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);