IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12970


Ignore:
Timestamp:
Apr 23, 2007, 2:56:30 PM (19 years ago)
Author:
jhoblitt
Message:

change neb-addvol to properly mangle URIs into paths

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r12968 r12970  
    11Revision history for Perl module Poi::PixelData
     2
     3    - change neb-addvol to properly mangle URIs into paths
    24
    350.04 Mon Apr 23 13:33:16 HST 2007
  • trunk/Nebulous-Server/bin/neb-addvol

    r4909 r12970  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: neb-addvol,v 1.1 2005-08-31 00:30:20 jhoblitt Exp $
     5# $Id: neb-addvol,v 1.2 2007-04-24 00:56:30 jhoblitt Exp $
    66
    77use strict;
     
    1313use DBI;
    1414use Nebulous::Server::SQL;
     15use URI;
    1516
    1617use Getopt::Long qw( GetOptions :config auto_help auto_version );
     
    4849my $sql = Nebulous::Server::SQL->new();
    4950
     51print "Checking URI...";
     52
     53my $path = URI::file->new($uri)->file;
     54unless (-d $path) {
     55    die "path: $path dirived from URI: $uri does not exist";
     56}
     57
     58print " OK\n";
     59
    5060print "Adding volume...";
    5161
    5262my $query = $dbh->prepare( $sql->new_volume );
    53 $query->execute( $name, $uri );
     63$query->execute( $name, $path );
    5464
    5565print " OK\n";
  • trunk/Nebulous/Changes

    r12968 r12970  
    11Revision history for Perl module Poi::PixelData
     2
     3    - change neb-addvol to properly mangle URIs into paths
    24
    350.04 Mon Apr 23 13:33:16 HST 2007
  • trunk/Nebulous/bin/neb-addvol

    r4909 r12970  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: neb-addvol,v 1.1 2005-08-31 00:30:20 jhoblitt Exp $
     5# $Id: neb-addvol,v 1.2 2007-04-24 00:56:30 jhoblitt Exp $
    66
    77use strict;
     
    1313use DBI;
    1414use Nebulous::Server::SQL;
     15use URI;
    1516
    1617use Getopt::Long qw( GetOptions :config auto_help auto_version );
     
    4849my $sql = Nebulous::Server::SQL->new();
    4950
     51print "Checking URI...";
     52
     53my $path = URI::file->new($uri)->file;
     54unless (-d $path) {
     55    die "path: $path dirived from URI: $uri does not exist";
     56}
     57
     58print " OK\n";
     59
    5060print "Adding volume...";
    5161
    5262my $query = $dbh->prepare( $sql->new_volume );
    53 $query->execute( $name, $uri );
     63$query->execute( $name, $path );
    5464
    5565print " OK\n";
Note: See TracChangeset for help on using the changeset viewer.