Changeset 27350

Show
Ignore:
Timestamp:
16.05.2013 14:33:31 (6 years ago)
Author:
kjdon
Message:

removing the J from directory name for dirname option for OID. If there are only digits will get a D in front.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/doc.pm

    r27306 r27350  
    420420        $OID = &util::tidy_up_oid($OID); 
    421421    } elsif ($self->{'OIDtype'} eq "dirname") { 
    422         $OID = 'J'; 
    423422        my $filename = $self->get_source_filename(); 
    424423        if (defined($filename)) { # && -e $filename) { 
     424        # get the immediate parent directory 
    425425        $OID = &File::Basename::dirname($filename); 
    426426        if (defined $OID) { 
    427             $OID = 'J'.&File::Basename::basename($OID); 
     427            $OID = &File::Basename::basename($OID); 
    428428            $OID = &util::tidy_up_oid($OID); 
    429429        } else { 
     
    432432        } 
    433433        } else { 
    434         print STDERR "Failed to find filename, generating hash id\n"; 
     434        print STDERR "Failed to find a filename, generating hash id\n"; 
    435435        $use_hash_oid = 1; 
    436436        }