Bug 149102

Summary: kpdf/kdirwatch fails on path with '#' in it
Product: [Unmaintained] kpdf Reporter: Matthias Raffelsieper <hoschiraffel>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Matthias Raffelsieper 2007-08-22 10:59:43 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages

I have a pdf file in a path that has a pound sign '#' in it. kpdf will open the file just fine, but the watch file will hang. The console gives me

kpdf: WARNING: Unknown mimetype 'inode/directory'.
kpdf: WARNING: KDirWatch: /home/matraf/Uni is a directory. Use addDir!


where the path to the file is /home/matraf/Uni/#cur/out.pdf, ie. it seems to be cut off at the position of the '#'-sign.
Comment 1 Albert Astals Cid 2007-08-22 22:59:34 UTC
SVN commit 703564 by aacid:

Use fromPathOrURL so people with strange dirs with # in them still get watching working
BUGS: 149102


 M  +1 -1      part.cpp  


--- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #703563:703564
@@ -612,7 +612,7 @@
     m_pageView->showText(i18n("Reloading the document..."), 0);
   }
 
-  if (KParts::ReadOnlyPart::openURL(m_file))
+  if (KParts::ReadOnlyPart::openURL(KURL::fromPathOrURL(m_file)))
   {
     if (m_viewportDirty.pageNumber >= (int)m_document->pages()) m_viewportDirty.pageNumber = (int)m_document->pages() - 1;
     m_document->setViewport(m_viewportDirty);
Comment 2 Matthias Raffelsieper 2007-08-23 08:13:14 UTC
Resolves the reported problem. Thanks for the fast response!