[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Where is the Trash clearing handeled ?
From:       Tom Chiverton <tom+kde-devel () falkensweb ! com>
Date:       2011-06-25 15:59:49
Message-ID: 201106251659.49553.tom+kde-devel () falkensweb ! com
[Download RAW message or body]

On Saturday 25 June 2011 13:08:46 Christoph Feck wrote:
> On Saturday 25 June 2011 11:51:47 Tom Chiverton wrote:
> > I'm looking at fixing https://bugs.kde.org/show_bug.cgi?id=79943 (limit
> > ~/.thumbnails size) and it seems sensible to start looking at how Trash
> > size limiting is done. Can anyone point to the module ?
> 
> kdebase/kde-runtime/kioslave/trash

adaptTrashSize() appears to be the sort of thing I'm after..
I suppose I need to do something similar from the createSubThumbnail() method in \
kioslave/thumbnail/thumbnail.cpp ?

> You probably need to store information which thumbnails where accessed 
> recently or frequently, so you do not delete the "wrong" ones.

The O/S provides this (atime). I guess there's also an (KIO ?) API for getting the \
space used by a directory. From looking at the Trash impl., there are already ways to \
get what is needed for minimal attempt at fixing this ASAP.

As this is a critical data loss bug (because eventually ~/.thumbnails consumes all \
available disk space and KDE gets *very* upset) I'm going with a simple solution \
first (delete everything unused for more than N days). There is a FreeDesktop.org \
spec for this as linked from the bug but it's from 2004.

-- 
Tom
Be truthful to your friends and lie like hell to your enemies.
 
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic