[Zope3-checkins] CVS: Zope3/lib/python/Zope/Publisher/VFS - VFSFileView.py:1.2

Stephan Richter srichter@cbu.edu
Mon, 23 Dec 2002 03:15:40 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/VFS
In directory cvs.zope.org:/tmp/cvs-serv26132/Zope/Publisher/VFS

Modified Files:
	VFSFileView.py 
Log Message:
Implemented VFS views for the Local Service Manager. You can now traverse
into it up to Packages. 

Since Jim did not tell me what he wanted to do in a Package, I did not 
add much there, so that all Services are shown as directories now. The 
only binding I implemented was for the ZPTTemplate, which works fine so
that you can add ZPTs via VFS now. I could imagine doing the same for 
Module, but other than that Package is rather boring from a VFS point of
view.

Of course we could do some "magic" and display a text (file content) 
representation of the various services, but I do not know how useful this 
would be.


=== Zope3/lib/python/Zope/Publisher/VFS/VFSFileView.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/Publisher/VFS/VFSFileView.py:1.1	Fri Dec 20 05:31:49 2002
+++ Zope3/lib/python/Zope/Publisher/VFS/VFSFileView.py	Mon Dec 23 03:15:40 2002
@@ -55,8 +55,8 @@
         
         data = self._getData()
         try:
-            if start != 0: data = data[start:]
             if end != -1: data = data[:end]
+            if start != 0: data = data[start:]
         except TypeError:
             pass
         outstream.write(data)
@@ -97,6 +97,10 @@
         else:
             created = zerotime
             modified = zerotime
+
+        if created is None:
+            created = zerotime
+
         if modified is None:
             modified = created