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
8c85cda9
Commit
8c85cda9
authored
Dec 21, 2016
by
Maurits van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log a warning when making a partial copy.
parent
f58a2968
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/OFS/CopySupport.py
src/OFS/CopySupport.py
+9
-2
No files found.
src/OFS/CopySupport.py
View file @
8c85cda9
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
from
cgi
import
escape
from
cgi
import
escape
from
marshal
import
dumps
from
marshal
import
dumps
from
marshal
import
loads
from
marshal
import
loads
import
logging
import
re
import
re
import
sys
import
sys
import
tempfile
import
tempfile
...
@@ -61,8 +62,8 @@ class CopyError(Exception):
...
@@ -61,8 +62,8 @@ class CopyError(Exception):
pass
pass
copy_re
=
re
.
compile
(
'^copy([0-9]*)_of_(.*)'
)
copy_re
=
re
.
compile
(
'^copy([0-9]*)_of_(.*)'
)
logger
=
logging
.
getLogger
(
'OFS'
)
_marker
=
[]
_marker
=
[]
class
CopyContainer
(
Base
):
class
CopyContainer
(
Base
):
...
@@ -607,6 +608,12 @@ class CopySource(Base):
...
@@ -607,6 +608,12 @@ class CopySource(Base):
# We do not use cp._delObject, because this would fire
# We do not use cp._delObject, because this would fire
# 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
(
'While copying %s, removed %s from copy '
'because user is not allowed to view the original.'
,
'/'
.
join
(
self
.
getPhysicalPath
()),
'/'
.
join
(
v
.
getPhysicalPath
())
)
cp
.
_delOb
(
k
)
cp
.
_delOb
(
k
)
# We need to cleanup the internal objects list, even when
# We need to cleanup the internal objects list, even when
# in some implementations this is always an empty tuple.
# in some implementations this is always an empty tuple.
...
...
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