CMFCore.DirectoryView
Can anyone tell my why my * Filesystem Directory View folder is losing it's skinspath every time i restart zope. When i instance new directory view it works fine. After a restart the path is still set correctly but the directory view is empty.* createDirectoryView ( self, 'lib/python/Products/MyProduct/skins', id='skins' ) registerDirectory('skins', globals())
drew nichols wrote at 2003-6-19 09:43 +1000:
Can anyone tell my why my * Filesystem Directory View folder is losing it's skinspath every time i restart zope. When i instance new directory view it works fine. After a restart the path is still set correctly but the directory view is empty.*
createDirectoryView ( self, 'lib/python/Products/MyProduct/skins', id='skins' ) registerDirectory('skins', globals())
I once faught with this. Not sure that your problem is the same as mine was. My problem was: FSDirectoryView tries to normalize the path (in order to make it easier to move the complete installation) by chopping off the SOFTWARE_HOME or INSTANCE_HOME prefix. In my case, the "INSTANCE_HOME" definition used an alias for the directory while inside Python a different path was used for the same directory. Because "FSDirectoryView" does not directly use the file system to resolve its path but looks the path up in a registry, it could not find the directory. When you add a new FSDirectoryView, you see the paths of all registered directories. When the path of your FSDirectoryView is not among them, your FSDV will appear empty. Dieter
participants (2)
-
Dieter Maurer -
drew nichols