Review Request 121461: Fix for bug 341773 and minor changes

Arjun AK arjunak234 at gmail.com
Sun Dec 28 12:06:09 UTC 2014



> On Dec. 26, 2014, 1:44 p.m., David Faure wrote:
> > This has been reverted for now, it broke the kio_trash unittest, because it doesn't preserve extensions anymore. Please revisit.
> 
> Arjun AK wrote:
>     Like i said in the ML, what should be done with the following files:
>     `.txt`
>     `..txt`
>     `...`
> 
> David Faure wrote:
>     With the goal of "preserving extensions", I would say:
>     
>     .txt -> 1.txt
>     ..txt -> 1..txt or .1.txt (don't really care which one)
>     ... -> whatever
>     
>     What the patch broke was much more severe:   file.foo became file.foo1 (for any unknown extension).

>.txt -> 1.txt
>..txt -> 1..txt or .1.txt (don't really care which one)

But the problem with that is `.txt` is a hidden file, If you change it to `1.txt`, it becomes visible. The user most likely doesn't want that.

>What the patch broke was much more severe:   file.foo became file.foo1 (for any unknown extension).

That indeed was wrong, i didn't handle the else part of `!db.suffixForFileName(oldName).isEmpty()`


- Arjun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121461/#review72518
-----------------------------------------------------------


On Dec. 23, 2014, 11:26 p.m., Arjun AK wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121461/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2014, 11:26 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Bugs: 341773
>     https://bugs.kde.org/show_bug.cgi?id=341773
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> 1.Fix bug 341773 (Replace dialog suggests incorrect filename when it contains dots). Make use of `QMimeDatabase::suffixForFileName` for calculating the extension.
> 2. Rename `.foo` and `..foo` into `.foo 1` and `..foo 1` respectively, instead of `1.foo` and `.1.foo`, since they are hidden files and we shouldn't be changing that.
> 
> 
> Diffs
> -----
> 
>   autotests/globaltest.cpp 06cb500 
>   src/core/global.cpp f18ac10 
> 
> Diff: https://git.reviewboard.kde.org/r/121461/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Arjun AK
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141228/326504cf/attachment.html>


More information about the Kde-frameworks-devel mailing list