- const QString mountPoint(KIO::findPathMountPoint(m_url.path()));
-
- KDiskFreeSp* job = new KDiskFreeSp(this);
- connect(job, SIGNAL(foundMountPoint(const unsigned long&,
- const unsigned long&,
- const unsigned long&,
- const QString& )),
- this, SLOT(slotFoundMountPoint(const unsigned long&,
- const unsigned long&,
- const unsigned long&,
- const QString& )));
+ // KDiskFreeSpace is for local paths only
+ if (!m_url.isLocalFile()) {
+ return;
+ }
+
+ m_gettingSize = true;
+ KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(m_url.path());
+ if (!mp)
+ return;
+
+ KDiskFreeSpace* job = new KDiskFreeSpace(this);
+ connect(job, SIGNAL(foundMountPoint(const QString&,
+ quint64,
+ quint64,
+ quint64)),
+ this, SLOT(slotFoundMountPoint(const QString&,
+ quint64,
+ quint64,
+ quint64)));