From b54fcda719b94c629c11e9b3462f2c9a2c5a9666 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 25 Aug 2019 11:21:21 +0900 Subject: tdeioslave media: fixed handling of mountable state for encrypted devices. Signed-off-by: Michele Calgaro --- tdeioslave/media/mediaimpl.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tdeioslave/media/mediaimpl.cpp') diff --git a/tdeioslave/media/mediaimpl.cpp b/tdeioslave/media/mediaimpl.cpp index dc839c4a0..ff66375aa 100644 --- a/tdeioslave/media/mediaimpl.cpp +++ b/tdeioslave/media/mediaimpl.cpp @@ -148,7 +148,7 @@ bool MediaImpl::listMedia(TQValueList &list) Medium::MList::const_iterator it = media.begin(); Medium::MList::const_iterator end = media.end(); - for(; it!=end; ++it) + for(; it != end; ++it) { if (!(*it).hidden()) { entry.clear(); @@ -365,6 +365,11 @@ void MediaImpl::slotStatResult(TDEIO::Job *job) TDEIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url) { + if (url.isEmpty()) + { + return TDEIO::UDSEntry(); + } + m_entryBuffer.clear(); TDEIO::StatJob *job = TDEIO::stat(url, false); @@ -448,7 +453,7 @@ void MediaImpl::createMediumEntry(TDEIO::UDSEntry& entry, else { KURL url = medium.prettyBaseURL(); - entry+= extractUrlInfos(url); + entry += extractUrlInfos(url); } } -- cgit v1.2.1