Index: /trunk/Nebulous/bin/neb-touch
===================================================================
--- /trunk/Nebulous/bin/neb-touch	(revision 16231)
+++ /trunk/Nebulous/bin/neb-touch	(revision 16232)
@@ -3,5 +3,5 @@
 # Copyright (C) 2007-2008  Joshua Hoblitt
 #
-# $Id: neb-touch,v 1.6 2008-01-25 02:44:49 jhoblitt Exp $
+# $Id: neb-touch,v 1.7 2008-01-25 20:54:04 jhoblitt Exp $
 
 use strict;
@@ -40,8 +40,12 @@
     unless defined $neb;
 
-
-unless ($neb->find_objects($file)) {
-    $neb->create($file, $volume)
-        or die "failed to create Nebulous key $file";
+unless (scalar @{$neb->find_objects($file)}) {
+    if (defined $volume) {
+        $neb->create($file, $volume)
+            or die "failed to create Nebulous key $file";
+    } else {
+        $neb->create($file)
+            or die "failed to create Nebulous key $file";
+    }
 }
 
Index: /trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 16231)
+++ /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 16232)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.37 2008-01-25 02:54:53 jhoblitt Exp $
+# $Id: Client.pm,v 1.38 2008-01-25 20:54:04 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -420,8 +420,7 @@
     $log->debug( "leaving" );
 
-# aparently empty arrays are being turned into undef by SOAP::Lite so the
-# behavior of this function is different then it's ::Server counter part
-
-    return scalar @$keys ? $keys : undef;
+# note that no keys found is returned as []
+
+    return $keys;
 }
 
Index: /trunk/Nebulous/t/64_client_find_objects.t
===================================================================
--- /trunk/Nebulous/t/64_client_find_objects.t	(revision 16231)
+++ /trunk/Nebulous/t/64_client_find_objects.t	(revision 16232)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 64_client_find_objects.t,v 1.1 2007-04-27 00:09:22 jhoblitt Exp $
+# $Id: 64_client_find_objects.t,v 1.2 2008-01-25 20:54:04 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 6;
+plan tests => 7;
 
 use lib qw( ./t ./lib );
@@ -31,5 +31,6 @@
     my $keys = $neb->find_objects();
 
-    is($keys, undef, 'number of keys found');
+    # undef indicates an error
+    is($keys, undef, 'undef is an error');
 }
 
@@ -67,4 +68,17 @@
 Test::Nebulous->setup;
 
+{
+    # key does not exist
+    my $neb = Nebulous::Client->new(
+        proxy => "http://$hostport/nebulous",
+    );
+
+    my $keys = $neb->find_objects( "bar" );
+
+    is_deeply($keys, [], 'number of keys found');
+}
+
+Test::Nebulous->setup;
+
 eval {
     my $neb = Nebulous::Client->new(
