Shared Mime spec: overriding globs locally

David Faure faure at kde.org
Wed Apr 8 03:02:25 PDT 2009


On Wednesday 08 April 2009, Alexander Larsson wrote:
> On Tue, 2009-03-31 at 20:42 +0200, David Faure wrote:
> > On Thursday 26 March 2009, Alexander Larsson wrote:
> > > On Thu, 2009-03-26 at 11:30 +0100, David Faure wrote:
> > > > What's the next step? I can provide a patch for the spec, but I have to rely on you
> > > > guys to do the code changes.
> > 
> > Patch for the specification attached, please review.
> > 
> > > Are there really much code changes required? 
> 
> What are the ordering behaviour of these nodes?
> For example in this:
> 
>     <glob pattern="*.foo"/>
>     <glob deleteall="true"/>
>     <glob pattern="*.bar"/>
> 
> Is foo deleted or not?
>
> Since deleteall is a attribute of glob, one could do:
> 
>     <glob deleteall="true" pattern="*.foo"/>
> 
> Is this allowed?

You're right, this is all a bit fishy.

> Maybe we should have a <glob-deleteall> node instead to avoid these
> issues? It would translate in the same way as the above in the files.

Good idea indeed. And then order doesn't matter, this node means
delete globs from previous dirs, not delete any globs found here, even if
it comes after <glob> elements, right? That seems sensible to me.

> The "deleteall" attribute for magic has the same issues, but it also
> looks from the diff as if its an attribute on the match node, not on the
> magic node. Thats not right, is it?

Oops, no indeed.

> Anyway, same as above, that might be better as <magic-deleteall>.

Agreed.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the xdg mailing list