Review Request: Allow "~" as folder name (bug: 117473)

Dawit Alemayehu adawit at kde.org
Wed Sep 8 18:19:40 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5186/#review7478
-----------------------------------------------------------



trunk/KDE/kdelibs/kfile/knewfilemenu.cpp
<http://svn.reviewboard.kde.org/r/5186/#comment7679>

    As Oswald suggested orignally, both this current and the previous logic are flawed. You need to first attempt to escape the "~" mark and then handle the resulting escaped string, i.e. the code should simply have handled the tilde mark as follows:
    
    if (name[0] == '~') {
       const QString expandedName = KShell::tildeExpand(name);
       // empty string means, cannot expand...
       if (!expandedName.isEmpty())
           name = expandedName;
    }
    
    And then it should simply check for if (name[0] == '/')...


- Dawit


On 2010-08-29 19:45:14, Mark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5186/
> -----------------------------------------------------------
> 
> (Updated 2010-08-29 19:45:14)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> This patch fixes https://bugs.kde.org/show_bug.cgi?id=117473 and allows "~" to be the folder name.
> this is also consistent with new file names that could already have the "~" name.
> 
> 
> This addresses bug 117473.
>     https://bugs.kde.org/show_bug.cgi?id=117473
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kfile/knewfilemenu.cpp 1169591 
> 
> Diff: http://svn.reviewboard.kde.org/r/5186/diff
> 
> 
> Testing
> -------
> 
> Tested the patch and seems to work fine.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100908/6963c8b0/attachment.htm>


More information about the kde-core-devel mailing list