Commit 7470690c authored by Sidnei da Silva's avatar Sidnei da Silva

      - Collector #2002: fixed broken 'ls -R' functionality (didn't
        recurse properly subclasses of OFS.Folder)
parent 65befeaf
......@@ -197,6 +197,9 @@ Zope Changes
Bugs Fixed
- Collector #2002: fixed broken 'ls -R' functionality (didn't
recurse properly subclasses of OFS.Folder)
- Collector #1992: unified the visible hostnames of the FTP and
HTTP servers
......@@ -208,7 +211,6 @@ Zope Changes
as specified through the 'charset' within the content-type
property.
- Collector #1939: When running as a service, Zope could
potentially collect too much log output filling the NT Event
Log. When that happened, a 'print' during exception handling
......
......@@ -527,7 +527,7 @@ class ObjectManager(
obj_ids.sort()
for id in obj_ids:
o=self._getOb(id)
if hasattr(o, 'isPrincipiaFolderish') and \
if hasattr(aq_base(o), 'isPrincipiaFolderish') and \
o.isPrincipiaFolderish:
r.append(o)
return r
......@@ -648,7 +648,7 @@ class ObjectManager(
break
ob=ob.aq_parent
files=self.objectItems()
files = list(self.objectItems())
# recursive ride through all subfolders (ls -R) (ajung)
......@@ -656,15 +656,10 @@ class ObjectManager(
all_files = copy.copy(files)
for f in files:
if f[1].meta_type == "Folder":
if hasattr(aq_base(f[1]), 'isPrincipiaFolderish') and f[1].isPrincipiaFolderish:
all_files.extend(findChildren(f[1]))
else:
all_files.append(f)
files = all_files
files = list(files)
# Perform globbing on list of files (ajung)
globbing = REQUEST.environ.get('GLOBBING','')
......@@ -746,12 +741,12 @@ def findChildren(obj,dirname=''):
find all children of an object (ajung)
"""
lst =[]
for name,child in obj.objectItems():
if child.meta_type=="Folder":
lst.extend(findChildren(child,dirname+ obj.id + '/'))
lst = []
for name, child in obj.objectItems():
if hasattr(aq_base(child), 'isPrincipiaFolderish') and child.isPrincipiaFolderish:
lst.extend(findChildren(child, dirname + obj.id + '/'))
else:
lst.append( (dirname + obj.id + "/" + name,child) )
lst.append((dirname + obj.id + "/" + name, child))
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