From 9dc8fb26405938834b13971c3188f4f52bb8b90d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 18 Jun 2024 11:19:44 +0200 Subject: Generate path configuration file --- src/timedate.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/timedate.cpp') diff --git a/src/timedate.cpp b/src/timedate.cpp index a320384..b06cbcc 100644 --- a/src/timedate.cpp +++ b/src/timedate.cpp @@ -120,6 +120,9 @@ static void slack_get_property(Glib::VariantBase& result, const Glib::RefPtr& connection, const Glib::ustring& name) { Glib::RefPtr introspection_data; - try { - auto introspection_xml = Glib::file_get_contents(dlackware::timedate::introspection_xml); - + auto introspection_xml = Glib::file_get_contents( + (std::filesystem::path(DATADIR_INTERFACES) / dlackware::timedate::bus_name).concat(".xml") + ); introspection_data = Gio::DBus::NodeInfo::create_for_xml(introspection_xml); } catch (Glib::Error& slack_err) @@ -194,7 +197,7 @@ namespace dlackware::timedate { return nullptr; } - return Glib::ustring{ zone_copied_from.get() + strlen(zoneinfo_database) + 1 }; + return Glib::ustring{ zone_copied_from.get() + zoneinfo_database.size() + 1 }; } void set_timezone(const Glib::ustring& zone, bool) -- cgit v1.2.3