Re: [PATCH] Fixed drag and drop between Nautilus and Mozilla



On Thu, 2005-01-13 at 18:16 +0100, Jorn Baayen wrote:
> On Thu, 2005-01-13 at 17:08 +0100, Alexander Larsson wrote:
> > On Thu, 2005-01-13 at 15:44 +0100, Jorn Baayen wrote:
> > > On Thu, 2005-01-13 at 14:32 +0100, Alexander Larsson wrote:
> > > > 
> > > > > Then there still is the remaining issue that the .desktop file
> > > > > generation code doesn't do an overwrite check. 
> > > > 
> > > > Yeah. We should probably make it try to generate a unique name.
> > > 
> > > Attaching a patch doing that.
> > 
> > I think it makes more sense if escaping the filename (and extension) is
> > done in nautilus_unique_file_name. Also, i'd prefer if the filenames
> > looked less "random". At the very least it should start by trying to use
> > the specified name without adding anything.
> 
> I adapted this stuff from the desktop file generation code in
> gnome-panel. However, here's a new patch which generates cleaner
> filenames and checks the specified name first.

I commited this with some changes:

+ int copy = 0;
No initialization at declaration in nautilus.

Added comment about how uniquification is not race free and should not
be used for security related things. Also renamed to
nautilus_ensure_unique_file_name() which i think describes what it does
a bit more.

the unique count start at 1 instead of 0.

nautilus_link_local_create() only uniquifies if requested.





=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a hate-fuelled sweet-toothed gentleman spy fleeing from a secret 
government programme. She's a strong-willed tomboy advertising executive on 
her way to prison for a murder she didn't commit. They fight crime! 




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