Index: audio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.module,v
retrieving revision 1.43
diff -u -r1.43 audio.module
--- audio.module	5 Apr 2006 08:16:11 -0000	1.43
+++ audio.module	5 Apr 2006 08:30:04 -0000
@@ -1330,14 +1330,17 @@
     $cleantags[$tag] = in_array($tag, $allowed_tags) ? $value : NULL;
   }
 
-  // update ID3 tags in the file...
-  audio_write_id3tags($node->audio_file->filepath, $cleantags);
+  // if there are any tags left to be written do so
+  if ($cleantags) {
+    // update ID3 tags in the file...
+    audio_write_id3tags($node->audio_file->filepath, $cleantags);
 
-  // then reload them so that the node is in sync with the file/database...
-  $info = audio_read_id3tags($node->audio_file->filepath);
-  $node->audio_tags = $info['tags'];
-  // ...merge so that the playcount and downloadable options aren't overwritten.
-  $node->audio_fileinfo = array_merge($node->audio_fileinfo, $info['fileinfo']);
+    // then reload them so that the node is in sync with the file/database...
+    $info = audio_read_id3tags($node->audio_file->filepath);
+    $node->audio_tags = $info['tags'];
+    // ...merge so that the playcount and downloadable options aren't overwritten.
+    $node->audio_fileinfo = array_merge($node->audio_fileinfo, $info['fileinfo']);
+  }
 }
 
 /**

