[Zope3-checkins] CVS: Zope3/utilities/fssync - commit.py:1.7
Guido van Rossum
guido@python.org
Tue, 6 May 2003 15:13:39 -0400
Update of /cvs-repository/Zope3/utilities/fssync
In directory cvs.zope.org:/tmp/cvs-serv21259
Modified Files:
commit.py
Log Message:
Use commands.mkarg() here too.
=== Zope3/utilities/fssync/commit.py 1.6 => 1.7 ===
--- Zope3/utilities/fssync/commit.py:1.6 Mon May 5 18:17:40 2003
+++ Zope3/utilities/fssync/commit.py Tue May 6 15:13:39 2003
@@ -20,8 +20,6 @@
from common import isNewObject
from transaction import get_transaction
-env = os.environ
-
def commit(fspath, dbpath, siteconfpath, mode=None):
"""Checks in from file system to ZODB
@@ -63,25 +61,8 @@
break
else:
if sandbox_path.find(vpath) < 0:
- fmt_sandbox_path = ''
- fmt_original_path = ''
- for dir in sandbox_path.split(os.sep):
- if ' ' in dir:
- fmt_sandbox_path = os.path.join(fmt_sandbox_path,
- "'"+dir+"'")
- else:
- fmt_sandbox_path = os.path.join(fmt_sandbox_path,
- dir)
-
- for dir in original_path.split(os.sep):
- if ' ' in dir:
- fmt_original_path = os.path.join(fmt_original_path,
- "'"+dir+"'")
- else:
- fmt_original_path = os.path.join(fmt_original_path,
- dir)
- fmt_sandbox_path = os.sep + fmt_sandbox_path
- fmt_original_path = os.sep + fmt_original_path
+ fmt_sandbox_path = commands.mkarg(sandbox_path)
+ fmt_original_path = commands.mkarg(original_path)
ob = getObject(zopedb_path, root)
zopedb_temp_file = createTempfile(ob, zopedb_path)