[Zope] Re: LocalFS-0.10.1 and zope-2.3.x - subdirectories not found

Jonothan Farr jfarr@real.com
Wed, 21 Feb 2001 10:36:21 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_029D_01C09BF2.21D19C70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> I have tried updating to zope-2.3.0 and LocalFS-0.10.1 but now I cannot
> access any subdirectories in my local filesystems - I get resource not
> found errors when I try to traverse them or their contents. I get the
> same problem with zope-2.3.1b1.


I see what you mean. Looks like my last patch was a little sloppy. Here's a
patch for it. I'll roll a new release here in a bit. Thanks for bringing that to
my attention.

--jfarr


--- LocalFS.py.orig Fri Feb 09 23:14:48 2001
+++ LocalFS.py Wed Feb 21 10:29:36 2001
@@ -522,7 +522,7 @@
         ob = None
         path = self._getpath(id)
         if (os.path.isdir(path)):
-            ob = LocalDirectory(id, path, self.root, self.tree_view,
+            ob = LocalDirectory(id, path, self.root or self, self.tree_view,
                 self.catalog, self._type_map, self._icon_map)
         elif (os.path.isfile(path)):
             f = open(path, 'rb')
@@ -760,7 +760,7 @@
         op=cp[0]
         for ids in cp[1]:
             m.ids=ids
-            try: ob=m.bind(self.root)
+            try: ob=m.bind(self.root or self)
             except: raise CopyError, eNotFound
             self._verifyObjectPaste(ob, REQUEST)
             oblist.append(ob)
@@ -1168,6 +1168,7 @@
     _connected = 0
     tree_view = 1
     catalog = 0
+    root = None

     def __init__(self, id, title, basepath, username, password):
         LocalDirectory.__init__(self, id, basepath, self, self.tree_view,

------=_NextPart_000_029D_01C09BF2.21D19C70
Content-Type: application/octet-stream;
	name="LocalFS.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="LocalFS.patch"

--- LocalFS.py.orig	Fri Feb 09 23:14:48 2001=0A=
+++ LocalFS.py	Wed Feb 21 10:29:36 2001=0A=
@@ -522,7 +522,7 @@=0A=
         ob =3D None=0A=
         path =3D self._getpath(id)=0A=
         if (os.path.isdir(path)):=0A=
-            ob =3D LocalDirectory(id, path, self.root, self.tree_view,=0A=
+            ob =3D LocalDirectory(id, path, self.root or self, =
self.tree_view,=0A=
                 self.catalog, self._type_map, self._icon_map)=0A=
         elif (os.path.isfile(path)):=0A=
             f =3D open(path, 'rb')=0A=
@@ -760,7 +760,7 @@=0A=
         op=3Dcp[0]=0A=
         for ids in cp[1]:=0A=
             m.ids=3Dids=0A=
-            try: ob=3Dm.bind(self.root)=0A=
+            try: ob=3Dm.bind(self.root or self)=0A=
             except: raise CopyError, eNotFound=0A=
             self._verifyObjectPaste(ob, REQUEST)=0A=
             oblist.append(ob)=0A=
@@ -1168,6 +1168,7 @@=0A=
     _connected =3D 0=0A=
     tree_view =3D 1=0A=
     catalog =3D 0=0A=
+    root =3D None=0A=
     =0A=
     def __init__(self, id, title, basepath, username, password):=0A=
         LocalDirectory.__init__(self, id, basepath, self, =
self.tree_view, =0A=

------=_NextPart_000_029D_01C09BF2.21D19C70--