IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2008, 10:54:04 AM (18 years ago)
Author:
jhoblitt
Message:

define Nebulous::Client::find_objects() as returning [] when NO keys are found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/bin/neb-touch

    r16225 r16232  
    33# Copyright (C) 2007-2008  Joshua Hoblitt
    44#
    5 # $Id: neb-touch,v 1.6 2008-01-25 02:44:49 jhoblitt Exp $
     5# $Id: neb-touch,v 1.7 2008-01-25 20:54:04 jhoblitt Exp $
    66
    77use strict;
     
    4040    unless defined $neb;
    4141
    42 
    43 unless ($neb->find_objects($file)) {
    44     $neb->create($file, $volume)
    45         or die "failed to create Nebulous key $file";
     42unless (scalar @{$neb->find_objects($file)}) {
     43    if (defined $volume) {
     44        $neb->create($file, $volume)
     45            or die "failed to create Nebulous key $file";
     46    } else {
     47        $neb->create($file)
     48            or die "failed to create Nebulous key $file";
     49    }
    4650}
    4751
Note: See TracChangeset for help on using the changeset viewer.