diff --git a/filefield_sources.module b/filefield_sources.module
index 4ca5796..babf889 100644
--- a/filefield_sources.module
+++ b/filefield_sources.module
@@ -435,6 +435,13 @@
   // Ensure the destination is writable.
   file_prepare_directory($destination, FILE_CREATE_DIRECTORY);
 
+  // Check if this is actually the same file being "attached" to a file record.
+  // If so, it acts as a file replace, except no file is actually moved.
+  $same_file = $destination . $file->filename === $file->uri;
+  if ($same_file) {
+    $replace = FILE_EXISTS_REPLACE;
+  }
+
   $file->destination = file_destination($destination . $file->filename, $replace);
   // If file_destination() returns FALSE then $replace == FILE_EXISTS_ERROR and
   // there's an existing file so we need to bail.
@@ -465,11 +472,13 @@
   // Move uploaded files from PHP's upload_tmp_dir to Drupal's temporary
   // directory. This overcomes open_basedir restrictions for future file
   // operations.
-  $file->uri = $file->destination;
-  if (!file_unmanaged_copy($filepath, $file->uri, $replace)) {
-    drupal_set_message(t('File upload error. Could not move uploaded file.'), 'error');
-    watchdog('file', 'Upload error. Could not move uploaded file %file to destination %destination.', array('%file' => $file->filename, '%destination' => $file->uri));
-    return FALSE;
+  if (!$same_file) {
+    $file->uri = $file->destination;
+    if (!file_unmanaged_copy($filepath, $file->uri, $replace)) {
+      drupal_set_message(t('File upload error. Could not move uploaded file.'), 'error');
+      watchdog('file', 'Upload error. Could not move uploaded file %file to destination %destination.', array('%file' => $file->filename, '%destination' => $file->uri));
+      return FALSE;
+    }
   }
 
   // Set the permissions on the new file.
diff --git a/sources/attach.inc b/sources/attach.inc
index cbe3fd9..800d0c0 100644
--- a/sources/attach.inc
+++ b/sources/attach.inc
@@ -248,7 +248,9 @@
       $item = array_merge($item, (array) $file);
 
       // Delete the original file if "moving" the file instead of copying.
-      if ($instance['widget']['settings']['filefield_sources']['source_attach']['attach_mode'] !== 'copy') {
+      $attach_mode = $instance['widget']['settings']['filefield_sources']['source_attach']['attach_mode'];
+      $same_file = $filepath === $file->uri;
+      if ($attach_mode !== 'copy' && !$same_file) {
         @unlink($filepath);
       }
     }