Index: trunk/Nebulous-Server/Changes
===================================================================
--- trunk/Nebulous-Server/Changes	(revision 12968)
+++ trunk/Nebulous-Server/Changes	(revision 12970)
@@ -1,3 +1,5 @@
 Revision history for Perl module Poi::PixelData
+
+    - change neb-addvol to properly mangle URIs into paths
 
 0.04 Mon Apr 23 13:33:16 HST 2007
Index: trunk/Nebulous-Server/bin/neb-addvol
===================================================================
--- trunk/Nebulous-Server/bin/neb-addvol	(revision 12968)
+++ trunk/Nebulous-Server/bin/neb-addvol	(revision 12970)
@@ -3,5 +3,5 @@
 # Copyright (C) 2005  Joshua Hoblitt
 #
-# $Id: neb-addvol,v 1.1 2005-08-31 00:30:20 jhoblitt Exp $
+# $Id: neb-addvol,v 1.2 2007-04-24 00:56:30 jhoblitt Exp $
 
 use strict;
@@ -13,4 +13,5 @@
 use DBI;
 use Nebulous::Server::SQL;
+use URI;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
@@ -48,8 +49,17 @@
 my $sql = Nebulous::Server::SQL->new();
 
+print "Checking URI...";
+
+my $path = URI::file->new($uri)->file;
+unless (-d $path) {
+    die "path: $path dirived from URI: $uri does not exist";
+}
+
+print " OK\n";
+
 print "Adding volume...";
 
 my $query = $dbh->prepare( $sql->new_volume );
-$query->execute( $name, $uri );
+$query->execute( $name, $path );
 
 print " OK\n";
