Re: Trash directory on removable media - Bug 138058



On Fri, 2007-02-02 at 07:32 -0500, Jesse Stockall wrote:
> On 1/27/07, Jesse Stockall <jesse cleverone org> wrote:
> > Summary: Deleted files on removable media remain in the ~/$USER-trash
> > directory after the device is unmounted.
> >
> > http://bugzilla.gnome.org/show_bug.cgi?id=138058
> >
> 
> New patch that fixes the missing parts from the first attempt. It
> should probably also have a way to be disabled vis GConf.
> 
> http://bugzilla.gnome.org/attachment.cgi?id=81733&action=view

Its a bit hard to read the patch with the linebreaking it got in the
mailer. However, some comments:

It seems better to use nautilus_file_operations_delete() for the
deletion. Then you automatically get progress bars, it integrates with
NautilusFile (via the sync callbacks), etc. You'll have to add a
callback argument to it so you can unmount when its done/failed, but
that should be simple.

You do synchronous i/o (in e.g. num_entries_in_dir) which is a total
no-no in Nautilus. Furthermore, being the thrash dir this information is
likely already cached in the nautilus async file handling machinery. You
should use NautilusFile/NautilusDirectory to handle this.

The coding style guides are in docs/style-guide.html. You seem to be
lacking spaces in front of parenthesis in a couple of places and do
things like assignment at declaration.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal hunchbacked astronaut for the 21st century. She's a beautiful 
extravagent Valkyrie with an incredible destiny. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]