Commit d9a7a8ad authored by Sidnei da Silva's avatar Sidnei da Silva

parent aa16e459
...@@ -22,11 +22,6 @@ Zope Changes ...@@ -22,11 +22,6 @@ Zope Changes
- Collector #1233: port ZOPE_CONFIG patch from Zope 2.7 to Zope 2.8 - Collector #1233: port ZOPE_CONFIG patch from Zope 2.7 to Zope 2.8
after Zope 2.9.0
- Collector #2002: fixed broken 'ls -R' functionality (didn't
recurse properly subclasses of OFS.Folder)
Zope 2.9.0 (2006/01/09) Zope 2.9.0 (2006/01/09)
Bugs fixed Bugs fixed
......
...@@ -524,7 +524,7 @@ class ObjectManager( ...@@ -524,7 +524,7 @@ class ObjectManager(
obj_ids.sort() obj_ids.sort()
for id in obj_ids: for id in obj_ids:
o=self._getOb(id) o=self._getOb(id)
if hasattr(aq_base(o), 'isPrincipiaFolderish') and \ if hasattr(o, 'isPrincipiaFolderish') and \
o.isPrincipiaFolderish: o.isPrincipiaFolderish:
r.append(o) r.append(o)
return r return r
...@@ -641,7 +641,7 @@ class ObjectManager( ...@@ -641,7 +641,7 @@ class ObjectManager(
break break
ob=ob.aq_parent ob=ob.aq_parent
files = list(self.objectItems()) files=self.objectItems()
# recursive ride through all subfolders (ls -R) (ajung) # recursive ride through all subfolders (ls -R) (ajung)
...@@ -649,10 +649,15 @@ class ObjectManager( ...@@ -649,10 +649,15 @@ class ObjectManager(
all_files = copy.copy(files) all_files = copy.copy(files)
for f in files: for f in files:
if hasattr(aq_base(f[1]), 'isPrincipiaFolderish') and f[1].isPrincipiaFolderish: if f[1].meta_type == "Folder":
all_files.extend(findChildren(f[1])) all_files.extend(findChildren(f[1]))
else:
all_files.append(f)
files = all_files files = all_files
files = list(files)
# Perform globbing on list of files (ajung) # Perform globbing on list of files (ajung)
globbing = REQUEST.environ.get('GLOBBING','') globbing = REQUEST.environ.get('GLOBBING','')
...@@ -730,12 +735,12 @@ def findChildren(obj,dirname=''): ...@@ -730,12 +735,12 @@ def findChildren(obj,dirname=''):
find all children of an object (ajung) find all children of an object (ajung)
""" """
lst = [] lst =[]
for name, child in obj.objectItems(): for name,child in obj.objectItems():
if hasattr(aq_base(child), 'isPrincipiaFolderish') and child.isPrincipiaFolderish: if child.meta_type=="Folder":
lst.extend(findChildren(child, dirname + obj.id + '/')) lst.extend(findChildren(child,dirname+ obj.id + '/'))
else: else:
lst.append((dirname + obj.id + "/" + name, child)) lst.append( (dirname + obj.id + "/" + name,child) )
return lst return lst
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment