Index: /trunk/Nebulous/Changes
===================================================================
--- /trunk/Nebulous/Changes	(revision 17764)
+++ /trunk/Nebulous/Changes	(revision 17765)
@@ -2,4 +2,5 @@
 
 0.09
+    - change replicate() to report when it fails to cleanup (after a failure)
     - add neb-xattr util
     - change Nebulous::Client->find() to handle a volume param and to fall back
Index: /trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17764)
+++ /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17765)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.53 2008-05-21 20:46:18 jhoblitt Exp $
+# $Id: Client.pm,v 1.54 2008-05-22 01:39:41 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -245,5 +245,9 @@
     my $success = File::Copy::copy( $fh, $new_fh );
     unless ($success) {
-        $self->delete_instance("$uri");
+        # if the copy failed we now have a zero length instances floating
+        # around that must be removed
+        unless ($self->delete_instance("$uri")) {
+            $log->logdie( "can not copy instance $uri AND FAILED TO CLEANUP EMPTY INSTANCE" );
+        }
         $log->logdie( "can not copy instance $uri" );
     } 
