Trash spec 0.4

mr at mr at
Thu Sep 9 16:36:35 EEST 2004


> The spec should perhaps mention something about fully resolving the
> symlink before generating the relative pathname.

OK. This will be in 0.6

> So, what if I run in the utf8 locale, but have an old file with an
> iso-8859-1 encoded filename? Or I somehow got a file with a kio8-r
> filename from some tarball i unpacked? Given just a filename on the
> filesystem to trash, how am I supposed to know what encoding to put in
> the Encoding field?

As an aside, thanks for mentioning my home encoding, but it's actually
koi-8r , not kio :) kioslaves have nothing to do with Cyrillic ;)

As for knowing the encoding... might be not too easy indeed, but I'm not
sure what to do. Using the "raw" name might break things on network
shares, which may do translation for some clients (and not for others).

>> OK, good, that's what I implemented. I think Mikhail simply hinted at
>> "use O_EXCL as usual", without attempting to actually define a full
>> algorithm.
> Well. The way i read the current spec was:
> do {
>   make up filename
>   stat(filename)
> } while (not ENOENT);
> open(filename, O_CREATE)
> which isn't right, since it has a race condition.

OK, I'll make it more clear in 0.6. I'll probably use a bulleted or
numbered list to describe the entire sequence of actions.

>> > This also means the implementations *MUST* create the info files
>> first.
>> Yes - I think this is in the spec already.
> Its listed as "SHOULD", not "MUST".

OK, I'll change it to MUST in 0.6.

Yours, Mikhail Ramendik

More information about the xdg mailing list