Trash specification, version 0.1
Dave Cridland
dave at cridland.net
Tue Aug 31 14:39:12 EEST 2004
On Mon Aug 30 17:09:06 2004, Alexander Larsson wrote:
> On Mon, 2004-08-30 at 15:47, Dave Cridland wrote:
> > the content of the info file anyway. My gut feeling is that you >
> generally want to handle the trashed file itself first, then add
> the > metadata, which by definition is less critical to lose.
>
> Lose? rename is atomical. How would you lose data? Even in the copy
> case
> if the copy fails you won't delete the source file.
>
> I think what we decided was to do metadata first, in an atomic way
> to
> avoid races, and when you have the filename in the info dir you
> know its
> safe to use that name in the files dir.
No, you're absolutely right, and while *I* might lose data, that's
because I'm being terminally stupid over this. :-) Forget what I said.
For some reason I had it in my head that there might be occasions
when you want to do something other than a rename, but I've
completely forgotten what those occasions might have been now.
Dave.
More information about the xdg
mailing list