IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2009, 2:09:20 PM (17 years ago)
Author:
jhoblitt
Message:

base the on disk directory hashing of files only on the dirname() component of keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r23460 r23655  
    1515use DBI;
    1616use Digest::SHA1 qw( sha1_hex );
     17use File::Basename qw( dirname );
    1718use File::ExtAttr qw( setfattr );
    1819use File::Path;
    1920use File::Spec;
    2021use Log::Log4perl;
     22use Nebulous::Keys qw( parse_neb_key parse_neb_volume );
    2123use Nebulous::Server::Config;
    2224use Nebulous::Server::Log;
    2325use Nebulous::Server::SQL;
    24 use Nebulous::Keys qw( parse_neb_key parse_neb_volume );
    2526use Params::Validate qw( validate_pos SCALAR SCALARREF UNDEF );
    2627use URI::file;
     
    15791580    my ($key, $vol_path) = @_;
    15801581
     1582    # if the key has '/' in it, hash only the dirname() component
     1583    if ($key =~ m|/|) {
     1584        $key = dirname($key);
     1585    }
     1586
    15811587    # taken and modified from Cache::File::cache_file_path()
    15821588    # Copyright (C) 2003-2006 Chris Leishman.  All Rights Reserved.
Note: See TracChangeset for help on using the changeset viewer.