[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/kioslave/man
From:       Martin Koller <kollix () aon ! at>
Date:       2011-01-06 13:29:03
Message-ID: 20110106132903.73FACAC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1212296 by mkoller:

BUG: 189216
if a man page switches to a different man page (.so)
check if the named file exists with a suffix, even when given
with an absolute path


 M  +9 -4      kio_man.cpp  


--- trunk/KDE/kdebase/runtime/kioslave/man/kio_man.cpp #1212295:1212296
@@ -559,18 +559,23 @@
     }
     else
     {
-        if (QDir::isRelativePath(filename)) {
+        if (QDir::isRelativePath(filename))
+        {
             kDebug(7107) << "relative " << filename;
             filename = QDir::cleanPath(lastdir + '/' + filename).toUtf8();
-            if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix
+            kDebug(7107) << "resolved to " << filename;
+        }
+
                 lastdir = filename.left(filename.lastIndexOf('/'));
+
+        if ( !QFile::exists(QFile::decodeName(filename)) )  // if given file does \
not exist, find with suffix +        {
+            kDebug(7107) << "not existing " << filename;
                 QDir mandir(lastdir);
                 mandir.setNameFilters(QStringList() << \
                (filename.mid(filename.lastIndexOf('/') + 1) + ".*"));
                 filename = lastdir + '/' + \
                QFile::encodeName(mandir.entryList().first());
-            }
             kDebug(7107) << "resolved to " << filename;
         }
-        lastdir = filename.left(filename.lastIndexOf('/'));
 
         QIODevice *fd= KFilterDev::deviceForFile(filename);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic