Index: trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pm	(revision 20988)
+++ trunk/Nebulous/lib/Nebulous/Client.pm	(revision 23934)
@@ -243,5 +243,5 @@
         # if the copy failed we now have a zero length instances floating
         # around that must be removed
-        unless ($self->delete_instance("$uri")) {
+        unless ($self->delete_instance($key, "$uri")) {
             $log->logdie( "can not copy instance $uri AND FAILED TO CLEANUP EMPTY INSTANCE" );
         }
@@ -256,5 +256,5 @@
 
     unless ($src_md5 eq $dst_md5) {
-        $self->delete_instance("$uri");
+        $self->delete_instance($key, "$uri");
         $log->logdie( "md5sum mismatch" );
     }
@@ -327,5 +327,5 @@
     }
 
-    my $uri = $self->delete_instance( @$locations[0] );
+    my $uri = $self->delete_instance($key, @$locations[0]);
 
     $log->debug("leaving");
@@ -615,4 +615,8 @@
             return;
         }
+        if ($response->faultstring =~ /does not match any key or directory/) {
+            $log->debug( "leaving" );
+            return;
+        }
 
         $log->logdie("unhandled fault - ", $self->err);
@@ -813,5 +817,5 @@
     # a lock is implicitly removed when the last storage object is deleted
     foreach my $uri ( @$locations ) {
-        $self->delete_instance( $uri ) or return undef;
+        $self->delete_instance($key, $uri) or return undef;
     }
 
@@ -944,5 +948,8 @@
     my $self = shift;
 
-    my ($uri) = validate_pos(@_,
+    my ($key, $uri) = validate_pos(@_,
+        {
+            type => SCALAR,
+        },
         {
             type => SCALAR,
@@ -961,5 +968,5 @@
     $log->logdie( $@ ) if $@;
 
-    my $response = $self->{ 'server' }->delete_instance( $uri );
+    my $response = $self->{ 'server' }->delete_instance($key, $uri);
     if ( $response->fault ) {
         $self->set_err($response->faultstring);
Index: trunk/Nebulous/lib/Nebulous/Util.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Util.pm	(revision 20988)
+++ trunk/Nebulous/lib/Nebulous/Util.pm	(revision 23934)
@@ -45,4 +45,6 @@
 
 
+# XXX replace the unlink with a 'move to trash' operation
+# empty the trash with a daemon on the NSF server
 sub _nuke_file {
     my $path = shift;
