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
81fa13a3
Commit
81fa13a3
authored
Jul 20, 2003
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dbtab to mount a temporary folder instead of using the TemporaryFolder class
to do so.
parent
2e3cdb6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+13
-11
No files found.
lib/python/OFS/Application.py
View file @
81fa13a3
...
...
@@ -12,8 +12,8 @@
##############################################################################
__doc__
=
'''Application support
$Id: Application.py,v 1.19
2 2003/07/08 17:03:52 evan
Exp $'''
__version__
=
'$Revision: 1.19
2
$'
[
11
:
-
2
]
$Id: Application.py,v 1.19
3 2003/07/20 16:16:07 chrism
Exp $'''
__version__
=
'$Revision: 1.19
3
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
sys
,
App
.
Product
,
App
.
ProductRegistry
,
misc_
import
time
,
traceback
,
os
,
Products
...
...
@@ -280,17 +280,19 @@ def initialize(app):
# Ensure that a temp folder exists
if
not
hasattr
(
app
,
'temp_folder'
):
from
Products.TemporaryFolder.TemporaryFolder
import
\
MountedTemporaryFolder
tf
=
MountedTemporaryFolder
(
'temp_folder'
,
'Temporary Folder'
)
app
.
_setObject
(
'temp_folder'
,
tf
)
get_transaction
().
note
(
'Added temp_folder'
)
get_transaction
().
commit
()
del
tf
from
Products.ZODBMountPoint.MountedObject
import
manage_addMounts
try
:
manage_addMounts
(
app
,
(
'/temp_folder'
,))
get_transaction
().
note
(
'Added temp_folder'
)
get_transaction
().
commit
()
except
:
LOG
(
'Zope Default Object Creation'
,
ERROR
,
'Could not add a /temp_folder mount point due to an error.'
,
error
=
sys
.
exc_info
())
# Ensure that there is a transient container in the temp folder
tf
=
app
.
temp_folder
if
not
hasattr
(
aq_base
(
tf
),
'session_data'
):
tf
=
getattr
(
app
,
'temp_folder'
,
None
)
if
tf
is
not
None
and
not
hasattr
(
aq_base
(
tf
),
'session_data'
):
env_has
=
os
.
environ
.
get
from
Products.Transience.Transience
import
TransientObjectContainer
addnotify
=
env_has
(
'ZSESSION_ADD_NOTIFY'
,
None
)
...
...
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