g_local_file_trash: write info file first
g_local_file_trash: write info file first

Recent changes to file monitors removed the delay before events were
reported.  Among other things, this caused the trash backend of gvfs to
notice trashed files sooner than before.

On noticing trashed files, the backend tries to read the info file to
discover (among other things) the original location of the file.

Unfortunately, g_local_file_trash() does a strange dance when trashing a
file.  It does a loop of open(O_EXCL) in order to file an empty filename
in the trash to write an info file to, trashes the file, and only then
writes the contents of the info file.  This means that at the time the
file is moved to the trash, the info file is an empty stub.

Change the order so that we write out the actual content of the info
file first.  If the actual trash files then we will unlink the info file
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=749314

Distrotech/glib,johne53/MB3Glib,johne53/MB3Glib,Distrotech/glib,MathieuDuponchelle/glib,ieei/glib,ieei/glib,ieei/glib,MathieuDuponchelle/glib,mzabaluev/glib,johne53/MB3Glib,mzabaluev/glib,MathieuDuponchelle/glib,endlessm/glib,ieei/glib,endlessm/glib,johne53/MB3Glib,endlessm/glib,Distrotech/glib,mzabaluev/glib,MathieuDuponchelle/glib,johne53/MB3Glib,endlessm/glib,johne53/MB3Glib,mzabaluev/glib,Distrotech/glib,Distrotech/glib,endlessm/glib,mzabaluev/glib,ieei/glib,MathieuDuponchelle/glib