diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-22 14:28:04 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-22 14:41:56 +0100 |
commit | 98258acc3716d9d6bd79245f9be83dcc7271c819 (patch) | |
tree | 048faa3a037aeac48719cfa0f899be8592974d53 /src | |
parent | 8002bc752f958f05cbb024b5eb1c3c88cfd2e1f2 (diff) |
storage/udisks2: pass Path to SetMountPoint()
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/plugins/UdisksStorage.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/storage/plugins/UdisksStorage.cxx b/src/storage/plugins/UdisksStorage.cxx index 844322efd..6cce7d14b 100644 --- a/src/storage/plugins/UdisksStorage.cxx +++ b/src/storage/plugins/UdisksStorage.cxx @@ -120,8 +120,8 @@ public: const char *MapToRelativeUTF8(const char *uri_utf8) const noexcept override; private: - void SetMountPoint(const char *mount_point); - void LockSetMountPoint(const char *mount_point); + void SetMountPoint(Path mount_point); + void LockSetMountPoint(Path mount_point); void OnListReply(ODBus::Message reply) noexcept; @@ -135,16 +135,16 @@ private: }; inline void -UdisksStorage::SetMountPoint(const char *mount_point) +UdisksStorage::SetMountPoint(Path mount_point) { - mounted_storage = CreateLocalStorage(Path::FromFS(mount_point)); + mounted_storage = CreateLocalStorage(mount_point); mount_error = {}; want_mount = false; cond.broadcast(); } void -UdisksStorage::LockSetMountPoint(const char *mount_point) +UdisksStorage::LockSetMountPoint(Path mount_point) { const std::lock_guard<Mutex> lock(mutex); SetMountPoint(mount_point); @@ -174,7 +174,7 @@ UdisksStorage::OnListReply(ODBus::Message reply) noexcept /* already mounted: don't attempt to mount again, because this would result in org.freedesktop.UDisks2.Error.AlreadyMounted */ - LockSetMountPoint(mount_point.c_str()); + LockSetMountPoint(Path::FromFS(mount_point.c_str())); return; } } catch (...) { @@ -254,7 +254,7 @@ try { throw std::runtime_error("Malformed 'Mount' response"); const char *mount_path = i.GetString(); - LockSetMountPoint(mount_path); + LockSetMountPoint(Path::FromFS(mount_path)); } catch (...) { const std::lock_guard<Mutex> lock(mutex); mount_error = std::current_exception(); |