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
e9fa3d72
Commit
e9fa3d72
authored
Dec 21, 2016
by
Maurits van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include the target folder when warning about partial copy.
parent
94b676fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/OFS/CopySupport.py
src/OFS/CopySupport.py
+5
-4
No files found.
src/OFS/CopySupport.py
View file @
e9fa3d72
...
@@ -540,9 +540,9 @@ class CopySource(Base):
...
@@ -540,9 +540,9 @@ class CopySource(Base):
# being copied, so it makes no sense to check any of its sub
# being copied, so it makes no sense to check any of its sub
# objects. It probably means we are in a test.
# objects. It probably means we are in a test.
return
ob
return
ob
return
self
.
_cleanupCopy
(
ob
)
return
self
.
_cleanupCopy
(
ob
,
container
)
def
_cleanupCopy
(
self
,
cp
):
def
_cleanupCopy
(
self
,
cp
,
container
):
sm
=
getSecurityManager
()
sm
=
getSecurityManager
()
ob
=
aq_base
(
self
)
ob
=
aq_base
(
self
)
if
hasattr
(
ob
,
'objectIds'
):
if
hasattr
(
ob
,
'objectIds'
):
...
@@ -553,9 +553,10 @@ class CopySource(Base):
...
@@ -553,9 +553,10 @@ class CopySource(Base):
# events that are needless for objects that are not even in
# events that are needless for objects that are not even in
# an Acquisition chain yet.
# an Acquisition chain yet.
logger
.
warn
(
logger
.
warn
(
'While copying %s, removed %s from copy '
'While copying %s
to %s
, removed %s from copy '
'because user is not allowed to view the original.'
,
'because user is not allowed to view the original.'
,
'/'
.
join
(
self
.
getPhysicalPath
()),
'/'
.
join
(
self
.
getPhysicalPath
()),
'/'
.
join
(
container
.
getPhysicalPath
()),
'/'
.
join
(
v
.
getPhysicalPath
())
'/'
.
join
(
v
.
getPhysicalPath
())
)
)
cp
.
_delOb
(
k
)
cp
.
_delOb
(
k
)
...
@@ -565,7 +566,7 @@ class CopySource(Base):
...
@@ -565,7 +566,7 @@ class CopySource(Base):
i
for
i
in
cp
.
_objects
if
i
[
'id'
]
!=
k
])
i
for
i
in
cp
.
_objects
if
i
[
'id'
]
!=
k
])
else
:
else
:
# recursively check
# recursively check
v
.
_cleanupCopy
(
cp
.
_getOb
(
k
))
v
.
_cleanupCopy
(
cp
.
_getOb
(
k
)
,
container
)
return
cp
return
cp
def
_postCopy
(
self
,
container
,
op
=
0
):
def
_postCopy
(
self
,
container
,
op
=
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