Skip to content

Commit

Permalink
fix: dbus name error
Browse files Browse the repository at this point in the history
fix dbus name error

log:
  • Loading branch information
Johnson-zs committed Sep 14, 2024
1 parent 4e260bb commit aeda599
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dfm-mount/private/dnetworkmounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

DFM_MOUNT_USE_NS

static constexpr char kDaemonService[] { "org.deepin.Filemanager" };
static constexpr char kDaemonPath[] { "/org/deepin/Filemanager" };
static constexpr char kDaemonService[] { "org.deepin.Filemanager.MountControl" };
static constexpr char kDaemonPath[] { "/org/deepin/Filemanager/MountControl" };
static constexpr char kDaemonIntro[] { "org.freedesktop.DBus.Introspectable" };
static constexpr char kDaemonIntroMethod[] { "Introspect" };
static constexpr char kMountControlPath[] { "/org/deepin/Filemanager/MountControl" };
Expand Down Expand Up @@ -81,16 +81,16 @@ bool DNetworkMounter::isDaemonMountEnable()
if (reply.value().contains(R"(<node name="MountControl"/>)")) {
// check if "SupportedFileSystems" method exists
QDBusInterface introIface(kDaemonService,
"/com/deepin/filemanager/daemon/MountControl",
kDaemonPath,
kDaemonIntro,
QDBusConnection::systemBus());
QDBusReply<QString> ifaceDesc = introIface.call(kDaemonIntroMethod);
if (!ifaceDesc.value().contains(R"(<method name="SupportedFileSystems">)"))
return true;

QDBusInterface mountIface(kDaemonService,
"/com/deepin/filemanager/daemon/MountControl",
"com.deepin.filemanager.daemon.MountControl",
kMountControlPath,
kMountControlIFace,
QDBusConnection::systemBus());
QDBusReply<QStringList> supported = mountIface.call("SupportedFileSystems");
return supported.value().contains("cifs");
Expand Down

0 comments on commit aeda599

Please sign in to comment.