Review Request 121309: Letting KDirLister use the cache can lead to wrong file listing

Arjun AK arjunak234 at gmail.com
Tue Dec 2 14:31:25 GMT 2014



> On Dec. 2, 2014, 12:35 a.m., Mark Gaiser wrote:
> > Heh, this workaround is definately not what you would want to use. That basically renders the cache useless.
> > 
> > I'm not entirely sure where the issue is in this case.
> > 
> > If you unmount a folder _while_ it was being opened then i "think" the watch will cease to exist because.. well.. the folder being watched is gone. KDirLister has - to my knowledge - no mechanism to watch on non existing folders, but it can be done if you're really feeling adventurous [1].
> > 
> > I don't know what the best solution might be, but it smells like you need to know mount events to fix it properly. Dolphin probably knows mount events already so the most simple fix would probably involve dolphin looking at mount events and currently open folders. If it finds a match (mount event + open folder) then it should reload the folder.
> > 
> > Just my 5 cents.
> > 
> > [1] https://jdennis.fedorapeople.org/lwatch/html/InotifyOverview.html

>well.. the folder being watched is gone. KDirLister has - to my knowledge - no mechanism to watch on non existing folders

When you unmount, the folder is not gone, its still there. Only the inotify watch has been removed, due to which KDirLister stops working. KDirLister should listen for IN_UNMOUNT event and when it encounters one, it should re add the watch. Apps (like dolphin) only care about changes to the directory. When one partition is unmounted and another one gets mounted in its place, it should be able to show the files and directories from the new partition.


- Arjun


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


On Dec. 1, 2014, 8:09 p.m., Arjun AK wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121309/
> -----------------------------------------------------------
> 
> (Updated Dec. 1, 2014, 8:09 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> Steps to reproduce:
> =================
> 
> 1. `# mount something /home/foo/bar`
> 2. Open dolphin and navigate to /home/foo/bar
> 3. `# umount /home/foo/bar; sleep 1; mount something /home/foo/bar`
> 
> Dolphin will continue to show that the directory is empty until you press F5.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemmodel.cpp 72acf77 
> 
> Diff: https://git.reviewboard.kde.org/r/121309/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Arjun AK
> 
>

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


More information about the kfm-devel mailing list