Hi Rocky!

Rocky Burt wrote:

Perhaps a patch from my side would more adequately explain what it is
I'm trying to accomplish.

I've attached the patch to this message.  The only thing that is missing
(for me) is tests at this point.

+1 for fixing this, but may I suggest another approach?

'minimal_fp' is a registry key created by 'utils.minimalpath'. Right now 'DirectoryView._dirpath' contains this registry key and I'd prefer to keep it like that.

The keys generated by 'utils.minimalpath' currently look like this:


But we could change 'utils.minimalpath' to generate keys like these:


While it doesn't make sense to store "full/path/to/MyPackage/skins/my_skin" in 'DirectoryView._dirpath' "MyPackage/skins/my_skin" would work fine. All we need is a migration path.

We can use the same pattern as for GenericSetup's registerProfile: Omitting 'Products/' would become deprecated. For backwards compatibility DirectoryInformations are first looked up with a "Products/" prefix and if no DirectoryInformation is registered for that key the plain 'DirectoryView._dirpath' is looked up.

With this lookup order "MyPackage/skins/my_skin" is masked by "Products/MyPackage/skins/my_skin", but I guess we can live without support for that rare case until we remove the BBB code.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to