Index: trunk/Nebulous-Server/Build.PL
===================================================================
--- trunk/Nebulous-Server/Build.PL	(revision 13257)
+++ trunk/Nebulous-Server/Build.PL	(revision 13269)
@@ -92,5 +92,5 @@
         'Net::Server::Daemonize'=> '0.05',
         'Sys::Statistics::Linux::DiskUsage' => '0.02',
-
+        'File::ExtAttr'         => '1.03',
     },
     build_requires      => {
Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 13257)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 13269)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.38 2007-05-04 23:36:46 jhoblitt Exp $
+# $Id: Server.pm,v 1.39 2007-05-05 01:41:29 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -208,11 +208,11 @@
     my $filename = $key;
     # mange '/'s into ':'
-    $key =~ s|/|:|g;
-    my $uri = URI::file->new("$vol_path/$key.$ins_id");
+    $filename =~ s|/|:|g;
+    my $uri = URI::file->new("$vol_path/$filename.$ins_id");
     $log->debug("generated uri $uri");
 
     # TODO add some stuff here to retry if unsucessful
     eval {
-        _create_empty_file($uri->file);
+        _create_empty_file($uri->file, $key);
     };
     if ($@) {
@@ -361,10 +361,13 @@
     }
 
-    my $uri = URI::file->new("$vol_path/$key.$ins_id");
+    my $filename = $key;
+    # mange '/'s into ':'
+    $filename =~ s|/|:|g;
+    my $uri = URI::file->new("$vol_path/$filename.$ins_id");
     $log->debug("generated uri $uri");
 
     # TODO add some stuff here to retry if unsucessful
     eval {
-        _create_empty_file($uri->file);
+        _create_empty_file($uri->file, $key);
     };
     if ($@) {
Index: trunk/Nebulous-Server/t/03_server_create_object.t
===================================================================
--- trunk/Nebulous-Server/t/03_server_create_object.t	(revision 13257)
+++ trunk/Nebulous-Server/t/03_server_create_object.t	(revision 13269)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.17 2007-05-04 00:43:44 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.18 2007-05-05 01:41:29 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 22;
+use Test::More tests => 28;
 
 use lib qw( ./t ./lib );
@@ -17,4 +17,5 @@
 use Test::URI;
 use URI::Split qw( uri_split );
+use File::ExtAttr qw( getfattr );
 
 my $neb = Nebulous::Server->new(
@@ -33,4 +34,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), 'foo', 'nebulous_key xattr');
 }
 
@@ -44,4 +47,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), '/foo', 'nebulous_key xattr');
 }
 
@@ -55,4 +60,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), '/foo/', 'nebulous_key xattr');
 }
 
@@ -66,4 +73,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), 'foo/', 'nebulous_key xattr');
 }
 
@@ -77,4 +86,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), 'foo/bar', 'nebulous_key xattr');
 }
 
@@ -88,4 +99,6 @@
     ok(-e $path, "file exists");
     uri_scheme_ok($uri, 'file');
+
+    is(getfattr($path, 'nebulous_key'), '/foo/bar', 'nebulous_key xattr');
 }
 
