Commit dec0949a authored by Yoshinori Okuji's avatar Yoshinori Okuji

use shutil.rmtree instead of removeAll.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17066 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 25fbccec
......@@ -37,7 +37,7 @@ from App.config import getConfiguration
from Globals import package_home
from Products.ERP5 import product_path
from Shared.DC.ZRDB.TM import TM
from Products.ERP5.Document.BusinessTemplate import removeAll
import shutil
from zLOG import LOG
......@@ -51,7 +51,7 @@ class Deletion(TM):
def _finish(self):
try:
LOG('Deletion', 0, 'removing %s' % self.path)
removeAll(self.path)
shutil.rmtree(self.path)
except OSError:
pass
......
......@@ -36,7 +36,7 @@ from Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from Products.PythonScripts.Utility import allow_class
from tempfile import mktemp
from Products.ERP5.Document.BusinessTemplate import removeAll
import shutil
class SubversionError(Exception):
"""The base exception class for the Subversion interface.
......@@ -277,7 +277,7 @@ try:
"""Remove all files and folders in list
"""
for file_path in path_list:
removeAll(file_path)
shutil.rmtree(file_path)
def diff(self, path, revision1, revision2):
tmp = mktemp()
......
......@@ -41,7 +41,7 @@ from cPickle import dumps, loads
from App.config import getConfiguration
from tempfile import gettempdir, mktemp
from Products.CMFCore.utils import getToolByName
from Products.ERP5.Document.BusinessTemplate import removeAll
import shutil
from xml.sax.saxutils import escape
from dircache import listdir
from OFS.Traversable import NotFound
......@@ -1058,7 +1058,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
# Security hole fix
raise SubversionSecurityError, 'You are not allowed to delete these files'
for file_path in path_list:
removeAll(self._getWorkingPath(file_path))
shutil.rmtree(self._getWorkingPath(file_path))
def getModifiedTree(self, business_template, show_unmodified=False) :
""" Return tree of files returned by svn status
......@@ -1139,7 +1139,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
except (pysvn.ClientError, NotFound, AttributeError, \
Error), error:
# Clean up
removeAll(path)
shutil.rmtree(path)
raise error
# Clean up
self.activate().removeAllInList([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