summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediaimpl.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2019-08-25 11:21:21 +0900
committerMichele Calgaro <[email protected]>2020-10-17 10:48:29 +0800
commitb54fcda719b94c629c11e9b3462f2c9a2c5a9666 (patch)
treeb3541609fd0e5aca04427b1c4ff759a9390c77b9 /tdeioslave/media/mediaimpl.cpp
parentd34f23f403e82f352e4c5d4e20966bcba2bec8c6 (diff)
downloadtdebase-b54fcda719b94c629c11e9b3462f2c9a2c5a9666.tar.gz
tdebase-b54fcda719b94c629c11e9b3462f2c9a2c5a9666.zip
tdeioslave media: fixed handling of mountable state for encrypted devices.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeioslave/media/mediaimpl.cpp')
-rw-r--r--tdeioslave/media/mediaimpl.cpp9
1 files changed, 7 insertions, 2 deletions
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<TDEIO::UDSEntry> &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);
}
}