[Digikam-devel] [Bug 125926] digikam: directories with a '#' in their name are not properly detected when created outside digikam or ...

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Apr 30 18:08:24 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=125926         




------- Additional Comments From marcel.wiesweg gmx de  2006-04-30 19:08 -------
SVN commit 535877 by mwiesweg:

digikam from trunk:
Properly convert filenames to URL
When creating a KURL from a QString filename,
always use setPath and not the default constructor.
setPath will escape characters (such as '#', which
means, if you think of HTML, an anchor link).

CCBUG: 125926


 M  +6 -3      albummanager.cpp  


--- trunk/extragear/graphics/digikam/digikam/albummanager.cpp #535876:535877
 @ -406,11 +406,14  @
         if (info.url.isEmpty() || info.url == "/")
             continue;
 
+        // Despite its name info.url is a QString.
+        // setPath takes care for escaping characters that are valid for files but not for URLs ('#')
+        KURL u;
+        u.setPath(info.url);
+        QString name = u.fileName();
         // Get its parent
-        KURL u = info.url;
-        QString name = u.fileName();
         QString purl = u.upURL().path(-1);
-        
+
         PAlbum* parent = d->pAlbumDict.find(purl);
         if (!parent)
         {



More information about the Digikam-devel mailing list