diff roundup/backends/blobfiles.py @ 2762:638fc2dab5a1 maint-0.7

fixed editing of message contents
author Richard Jones <richard@users.sourceforge.net>
date Fri, 15 Oct 2004 01:10:22 +0000
parents 4d112730e02f
children 0fe0452338ba
line wrap: on
line diff
--- a/roundup/backends/blobfiles.py	Fri Oct 15 00:25:05 2004 +0000
+++ b/roundup/backends/blobfiles.py	Fri Oct 15 01:10:22 2004 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-#$Id: blobfiles.py,v 1.12.2.1 2004-06-24 07:14:48 richard Exp $
+#$Id: blobfiles.py,v 1.12.2.2 2004-10-15 01:10:22 richard Exp $
 '''This module exports file storage for roundup backends.
 Files are stored into a directory hierarchy.
 '''
@@ -79,11 +79,11 @@
 
         # save to a temp file
         name = name + '.tmp'
-        # make sure we don't register the rename action more than once
-        if not os.path.exists(name):
-            # save off the rename action
-            self.transactions.append((self.doStoreFile, (classname, nodeid,
-                property)))
+
+        # save off the rename action
+        self.transactions.append((self.doStoreFile, (classname, nodeid,
+            property)))
+
         open(name, 'wb').write(content)
 
     def getfile(self, classname, nodeid, property):
@@ -117,6 +117,9 @@
         # determine the name of the file to write to
         name = self.filename(classname, nodeid, property)
 
+        if not os.path.exists(name+".tmp"):
+            return
+
         # content is being updated (and some platforms, eg. win32, won't
         # let us rename over the top of the old file)
         if os.path.exists(name):

Roundup Issue Tracker: http://roundup-tracker.org/