Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 13251)
+++ 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 ($@) {
