Index: attachment.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/attachment/attachment.module,v
retrieving revision 1.20
diff -u -p -r1.20 attachment.module
--- attachment.module	2 Aug 2007 17:38:57 -0000	1.20
+++ attachment.module	13 Sep 2007 20:54:37 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: attachment.module,v 1.20 2007/08/02 17:38:57 cscsteve Exp $
+// $Id: attachment.module,v 1.18.2.2 2007/08/02 17:37:32 cscsteve Exp $
 
 define(ATTACHMENT_EXTENSION_WHITELIST, variable_get('attachment_text_rename_whitelist', 'jpg jpeg gif png tiff txt html doc xls pdf ppt pps odt mp3 ogg wav wmv mpg'));
 
@@ -353,6 +353,7 @@ function attachment_add(&$node) {
   // existing attachment from the array.
   foreach ((array)$node->attachments as $key => $attachment) {
     if ($attachment['filename'] == $new_attachment['filename']) {
+      $new_attachment['aid'] = $attachment['aid'];
       $new_attachment['fid'] = $attachment['fid'];
       $remove_key = $key;
     }
