Commit edfcc28e authored by Jérome Perrin's avatar Jérome Perrin

previous change was wrong, we were not removing the directory, but everythinh inside


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24093 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca4cf17b
import os import os
import shutil import shutil
import glob
import ZODB import ZODB
from ZODB.DemoStorage import DemoStorage from ZODB.DemoStorage import DemoStorage
from ZODB.FileStorage import FileStorage from ZODB.FileStorage import FileStorage
...@@ -30,7 +31,8 @@ elif os.environ.get('erp5_save_data_fs'): ...@@ -30,7 +31,8 @@ elif os.environ.get('erp5_save_data_fs'):
for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'): for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'):
full_path = os.path.join(instance_home, dir) full_path = os.path.join(instance_home, dir)
if os.path.exists(full_path): if os.path.exists(full_path):
shutil.rmtree(full_path) for f in glob.glob('%s/*' % full_path):
os.unlink(f)
if os.path.exists(new_data_fs_path): if os.path.exists(new_data_fs_path):
os.remove(new_data_fs_path) os.remove(new_data_fs_path)
Storage = FileStorage(new_data_fs_path) Storage = FileStorage(new_data_fs_path)
......
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