Review Request: Fix Bug 310465 - Can't switch view mode for non-writable paths

Frank Reininghaus frank78ac at googlemail.com
Sun Nov 25 17:30:28 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107458/#review22520
-----------------------------------------------------------

Ship it!


Thanks Emmanuel for this patch! Looks good, just one little thing that I found out accidentally when testing this: the same bug happens if the .directory file is writable, but not readable. This may not be a very common use case, but I'd say that we better get rid of this issue once and for all now that we're looking at it.

Changing the condition

(fileInfo.exists() && !fileInfo.isWritable())

to

(fileInfo.exists() && !(fileInfo.isReadable() && fileInfo.isWritable()))

fixes that for me. If you agree that this makes sense, please include it in your commit. Moreover, it won't hurt to mention the bug number in the comment, just to make sure that anyone wondering in the future what this is about knows where to look.

- Frank Reininghaus


On Nov. 25, 2012, 3:06 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107458/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2012, 3:06 p.m.)
> 
> 
> Review request for Dolphin and Frank Reininghaus.
> 
> 
> Description
> -------
> 
> Fix Bug 310465 - Can't switch view mode for non-writable paths
> 
> Check also if the .directory file is writable, not only the parent folder.
> 
> 
> This addresses bug 310465.
>     http://bugs.kde.org/show_bug.cgi?id=310465
> 
> 
> Diffs
> -----
> 
>   dolphin/src/views/viewproperties.cpp ff0c274 
> 
> Diff: http://git.reviewboard.kde.org/r/107458/diff/
> 
> 
> Testing
> -------
> 
> Tested with:
> 1. Not-Writable Folder
> 2. Not-Writable .directory File but writable Folder
> 3. Writable Folder and writable .directory File (Normal case)
> 
> Works fine for me in all three cases ;)
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20121125/2b838130/attachment.htm>


More information about the kfm-devel mailing list