aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG4
-rw-r--r--Makefile2
-rw-r--r--TODO2
-rwxr-xr-xarchivemail.py17
-rwxr-xr-xsetup.py2
5 files changed, 20 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0046d4f..198005c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,8 @@
+Version 0.4.6 - 6 May 2002
+ * Fixed a bug where the os.rename() calls could fail if we were moving
+ temporary files across different filesystems/partitions.
+
Version 0.4.5 - 29 April 2002
* Fixed a bug where if you used the '--delete' option to completely clean
an mbox mailbox you would get a python error.
diff --git a/Makefile b/Makefile
index 51ab5bf..dea2285 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION=0.4.5
+VERSION=0.4.6
VERSION_TAG=v$(subst .,_,$(VERSION))
TARFILE=archivemail-$(VERSION).tar.gz
diff --git a/TODO b/TODO
index e178425..31968e5 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,5 @@
-Goals for next minor release (0.4.6):
+Goals for next minor release (0.4.7):
-------------------------------------
* Think about the best way to specify the names of archives created with
possibly an --archive-name option.
diff --git a/archivemail.py b/archivemail.py
index 182d43a..8020e89 100755
--- a/archivemail.py
+++ b/archivemail.py
@@ -22,7 +22,7 @@ Website: http://archivemail.sourceforge.net/
"""
# global administrivia
-__version__ = "archivemail v0.4.5"
+__version__ = "archivemail v0.4.6"
__cvs_id__ = "$Id$"
__copyright__ = """Copyright (C) 2002 Paul Rodger <paul@paulrodger.com>
This is free software; see the source for copying conditions. There is NO
@@ -392,7 +392,6 @@ class Mbox(mailbox.UnixMailbox):
completely deleted."""
assert(os.path.isfile(self.mbox_file_name))
vprint("turning '%s' into a zero-length file" % self.mbox_file_name)
- mtime = os.path.getmtime(self.mbox_file_name)
blank_file = open(self.mbox_file_name, "w")
blank_file.close()
@@ -439,7 +438,12 @@ class RetainMbox(Mbox):
os.chmod(self.mbox_file_name, mode)
vprint("renaming '%s' to '%s'" % (self.mbox_file_name, self.__final_name))
- os.rename(self.mbox_file_name, self.__final_name)
+ try:
+ os.rename(self.mbox_file_name, self.__final_name)
+ except OSError:
+ # file might be on a different filesystem -- move it manually
+ shutil.copy2(self.mbox_file_name, self.__final_name)
+ os.remove(self.mbox_file_name)
os.utime(self.__final_name, (atime, mtime)) # reset to original timestamps
_stale.retain = None
@@ -525,7 +529,12 @@ manually, and try running me again.""" % final_name)
final_name = final_name + ".gz"
vprint("renaming '%s' to '%s'" % (self.mbox_file_name,
final_name))
- os.rename(self.mbox_file_name, final_name)
+ try:
+ os.rename(self.mbox_file_name, final_name)
+ except OSError:
+ # file might be on a different filesystem -- move it manually
+ shutil.copy2(self.mbox_file_name, final_name)
+ os.remove(self.mbox_file_name)
_stale.archive = None
diff --git a/setup.py b/setup.py
index edfaf21..8c7a7f8 100755
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ check_python_version() # define & run this early - 'distutils.core' is new
from distutils.core import setup
setup(name="archivemail",
- version="0.4.5",
+ version="0.4.6",
description="archive and compress old email",
license="GNU GPL",
url="http://archivemail.sourceforge.net/",