Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
e8151d9c
Commit
e8151d9c
authored
Aug 20, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Really revert all experimental changes to OFS.Traversable
parent
ecd32892
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/OFS/Traversable.py
src/OFS/Traversable.py
+8
-6
No files found.
src/OFS/Traversable.py
View file @
e8151d9c
...
@@ -146,25 +146,26 @@ class Traversable:
...
@@ -146,25 +146,26 @@ class Traversable:
if
not
path
:
if
not
path
:
return
self
return
self
if
type
(
path
)
is
str
:
if
isinstance
(
path
,
str
)
:
# Unicode paths are not allowed
# Unicode paths are not allowed
path
=
path
.
split
(
'/'
)
path
=
path
.
split
(
'/'
)
else
:
else
:
path
=
list
(
path
)
path
=
list
(
path
)
REQUEST
=
{
'TraversalRequestNameStack'
:
path
}
REQUEST
=
{
'TraversalRequestNameStack'
:
path
}
path
.
reverse
()
path_pop
=
path
.
pop
path_pop
=
path
.
pop
if
not
path
[
-
1
]:
if
len
(
path
)
>
1
and
not
path
[
0
]:
# Remove trailing slash
# Remove trailing slash
path_pop
()
path_pop
(
0
)
if
restricted
:
if
restricted
:
validate
=
getSecurityManager
().
validate
validate
=
getSecurityManager
().
validate
if
path
and
not
path
[
0
]:
if
not
path
[
-
1
]:
# If the path starts with an empty string, go to the root first.
# If the path starts with an empty string, go to the root first.
path_pop
(
0
)
path_pop
()
obj
=
self
.
getPhysicalRoot
()
obj
=
self
.
getPhysicalRoot
()
if
restricted
:
if
restricted
:
validate
(
None
,
None
,
None
,
obj
)
# may raise Unauthorized
validate
(
None
,
None
,
None
,
obj
)
# may raise Unauthorized
...
@@ -173,7 +174,8 @@ class Traversable:
...
@@ -173,7 +174,8 @@ class Traversable:
resource
=
_marker
resource
=
_marker
try
:
try
:
for
name
in
path
:
while
path
:
name
=
path_pop
()
__traceback_info__
=
path
,
name
__traceback_info__
=
path
,
name
if
name
[
0
]
==
'_'
:
if
name
[
0
]
==
'_'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment