Review Request 125214: Add support for network shares in kio_trash

David Faure faure at kde.org
Mon Sep 14 07:21:44 UTC 2015


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

Ship it!



src/ioslaves/trash/trashimpl.h (line 25)
<https://git.reviewboard.kde.org/r/125214/#comment58966>

    namespace Solid { class Device; } would be enough here.



src/ioslaves/trash/trashimpl.cpp (line 831)
<https://git.reviewboard.kde.org/r/125214/#comment58963>

    this returns a bool, so you're missing an if()
    
    (it's unlikely to return false, e.g. no write access, return -1 if it does)



src/ioslaves/trash/trashimpl.cpp (line 838)
<https://git.reviewboard.kde.org/r/125214/#comment58965>

    strange default value, 1 would work just as well, wouldn't it?
    
    The first time we get here, we would use 1 and write NextID=2.
    
    This looks like a mix of the two solutions you had in mind ;)



src/ioslaves/trash/trashimpl.cpp (line 846)
<https://git.reviewboard.kde.org/r/125214/#comment58964>

    (not necessary, the dtor would do that anyway, but as you prefer)


- David Faure


On Sept. 13, 2015, 10:19 p.m., Bartosz SÅ‚awianowski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125214/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2015, 10:19 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Bugs: 177023
>     https://bugs.kde.org/show_bug.cgi?id=177023
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> kio_trash doesn't support network shares, causing "trashed" files to be copied into user's home directory.
> 
> This patch adds support for them by assigning them persistent ID's (because there is no device minor/major ID or any other integer we can use) which are stored in trashrc config file - because we need to share them between possible multiple kio_trash processes.
> 
> Network shares get ID's starting with 6000000 to avoid possible conflicts with block devices.
> 
> NextID is also stored in trashrc file, I guess I could drop it by simply using group.keyList().count() or iterating all entries and finding max ID. Need opinions 
> 
> Thought about using different config file to avoid adding mutable modifier to m_config, need opinions here as well
> 
> Also using KInterProcessLock which already was there instead of adding dependency on KDbusAddons framework
> 
> 
> Diffs
> -----
> 
>   src/ioslaves/trash/trashimpl.cpp 300d320 
>   src/ioslaves/trash/trashimpl.h cee9278 
> 
> Diff: https://git.reviewboard.kde.org/r/125214/diff/
> 
> 
> Testing
> -------
> 
> Arch Linux, few simple localhost NFS shares
> 
> 
> Thanks,
> 
> Bartosz SÅ‚awianowski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150914/86b8507c/attachment.html>


More information about the Kde-frameworks-devel mailing list