Bug 149102 - kpdf/kdirwatch fails on path with '#' in it
Summary: kpdf/kdirwatch fails on path with '#' in it
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 10:59 UTC by Matthias Raffelsieper
Modified: 2007-08-23 08:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!