File sgmltools-lite-html.diff of Package sgmltools-lite
*** sgmltools-lite-3.0.2/python/backends/Html.py.orig Sat Jan 20 04:20:31 2001
--- sgmltools-lite-3.0.2/python/backends/Html.py Tue Mar 13 10:21:16 2001
***************
*** 56,64 ****
destdir = os.path.join(self._fileparts[1], self._fileparts[0])
if os.path.exists(destdir):
! self._tracer.system('rm -rf ' + destdir + '/*')
! else:
! self._tracer.mkdir(destdir)
self._tracer.mv(self._tempdir, destdir)
self._tracer.rmdir(self._tempdir)
--- 56,64 ----
destdir = os.path.join(self._fileparts[1], self._fileparts[0])
if os.path.exists(destdir):
! self._tracer.system('rm -rf ' + destdir)
! # else:
! # self._tracer.mkdir(destdir)
self._tracer.mv(self._tempdir, destdir)
self._tracer.rmdir(self._tempdir)
--- sgmltools-lite-3.0.2/python/utils.py.~1~ Thu Mar 22 12:22:06 2001
+++ sgmltools-lite-3.0.2/python/utils.py Thu Mar 22 12:24:21 2001
@@ -352,7 +352,8 @@
def rmdir(self, dir):
"""Shorthand for the pattern trace('rmdir ' + x);os.rmdir(x)"""
self.trace('rmdir ' + dir)
- os.rmdir(dir)
+ if os.path.exists(dir):
+ os.rmdir(dir)
def symlink(self, src, dest):
"""Shorthand for the pattern trace('symlink... );os.symlink(...)"""