Review Request 111120: Also change the view mode, when the view properties settings file is not writeable.

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Wed Jun 19 16:07:39 BST 2013



> On June 19, 2013, 2:50 p.m., Frank Reininghaus wrote:
> > Thanks Emmanuel for looking into this issue!
> > 
> > The class ViewProperties does have support for storing the view properties in the user's home directory if the .directory file is not writeable. And this works fine for me if I remove the write permissions from any .directory file.
> > 
> > Could you please describe how you managed to reproduce the "cannot change view mode" bug? It seems that the lack of write permissions is not sufficient (or maybe, the code that detects if we have write permissions is broken?). Thanks.

> The class ViewProperties does have support for storing the view properties in the user's home directory if the .directory file is not writeable.
      if (!dirInfo.isWritable() || (fileInfo.exists() && !(fileInfo.isReadable() && fileInfo.isWritable())) || !isPartOfHome(m_filePath)) {
            m_filePath = destinationDir("local") + m_filePath;
      }

Dolphin always saves the .directory files in the user's home directory for non home paths. So I think there is something wrong with the write 
permission of the .directory file in the user's home directory (maybe the usage of sudo?!).

> Could you please describe how you managed to reproduce the "cannot change view mode" bug?
By making the .directory file read-only in the user's home directory.

Btw.: This patch fixes the same bug for ro mounted home partitions. Maybe useful for some special environments?


- Emmanuel


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


On June 19, 2013, 2:33 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111120/
> -----------------------------------------------------------
> 
> (Updated June 19, 2013, 2:33 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> The problem is, that the new view mode will be saved to the view properties file on view mode change. 
> After saving the new view mode, Dolphin re-reads the view properties file to get the new view
> mode from this file to apply it to the view. 
> 
> Change View Mode => Save View Mode to the file => Read View Mode from the file => Apply it to the View
> 
> When the view properties file is not writeable, the view mode can not be changed with the current 
> implementation.
> 
> This patch fixes this problem, because the view mode can always be changed, also if the properties file
> is not writable. (Dolphin tries to save the View Mode on view mode change)
> 
> Change View Mode => Apply it to the View + Save View Mode to the file if possible
> 
> 
> This addresses bug 318534.
>     http://bugs.kde.org/show_bug.cgi?id=318534
> 
> 
> Diffs
> -----
> 
>   dolphin/src/views/dolphinview.h 62b5df7 
>   dolphin/src/views/dolphinview.cpp d69d664 
> 
> Diff: http://git.reviewboard.kde.org/r/111120/diff/
> 
> 
> Testing
> -------
> 
> Works for me.
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

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


More information about the kfm-devel mailing list