File patch-r890379.diff of Package kdelibs4

Subject: Don't reload the current directory when selecting a file in the file dialog - possible crash
From: wstephenson@suse.de
Bug: kde#173454
Patch-upstream: 890379
--- kfile/kdiroperator.cpp	(revision 890378)
+++ kfile/kdiroperator.cpp	(revision 890379)
@@ -901,7 +901,9 @@ void KDirOperator::setUrl(const KUrl& _n
 
     if (!Private::isReadable(newurl)) {
         // maybe newurl is a file? check its parent directory
-        newurl.cd(QLatin1String(".."));
+        newurl.setPath(newurl.directory());
+        if (newurl.equals(d->currUrl, KUrl::CompareWithoutTrailingSlash))
+            return; // parent is current dir, nothing to do (fixes #173454, too)
         KIO::UDSEntry entry;
         bool res = KIO::NetAccess::stat(newurl, entry, this);
         KFileItem i(entry, newurl);
Index: kfile/kdiroperator.cpp
===================================================================
openSUSE Build Service is sponsored by