Summary: | MountHelper doesn't resolve symlinks to devices, yielding in broken behaviour | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Carsten Lohrke <carstenlohrke> |
Component: | media | Assignee: | Kevin Ottens <ervin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Carsten Lohrke
2006-08-17 00:08:23 UTC
SVN commit 601032 by fabo: BUG: 132523 mediamanager followsymlinks (approved by Kevin Ottens) * MediaManager::properties() follows symlinks on local paths. Thanks to Modestas Vainius M +6 -2 mediamanager.cpp --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/mediamanager.cpp #601031:601032 @@ -26,6 +26,7 @@ #include <klocale.h> #include <kdirnotify_stub.h> +#include <kstandarddirs.h> #include "mediamanagersettings.h" @@ -162,10 +163,13 @@ QPtrList<Medium> list = m_mediaList.list(); QPtrList<Medium>::const_iterator it = list.begin(); QPtrList<Medium>::const_iterator end = list.end(); + QString path; + for (; it!=end; ++it) { - kdDebug() << "comparing " << (*it)->mountPoint() << " " << u.path() << " " << (*it)->deviceNode() << endl; - if ((*it)->mountPoint() == u.path() || (*it)->deviceNode() == u.path()) { + path = KStandardDirs::realFilePath(u.path()); + kdDebug() << "comparing " << (*it)->mountPoint() << " " << path << " " << (*it)->deviceNode() << endl; + if ((*it)->mountPoint() == path || (*it)->deviceNode() == path) { m = *it; break; } |