Ignore:
Timestamp:
2004-08-10T16:37:58+12:00 (20 years ago)
Author:
davidb
Message:

doc.pm modified so filename stored under gsdlsourcefilename is local
to collection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/doc.pm

    r7902 r7929  
    5656              'OIDtype'=>"hash"}, $class;
    5757
    58     $self->set_source_filename ($source_filename) if defined $source_filename;
     58    if (defined $source_filename) {
     59    my $collect_dir = $ENV{'GSDLCOLLECTDIR'};
     60
     61    if (defined $collect_dir) {
     62        my $dirsep = &util::get_dirsep();
     63        if ($collect_dir !~ m/$dirsep$/) {
     64        $collect_dir .= $dirsep;
     65        }
     66
     67        $collect_dir =~ s/\\/\\\\/g; # escape DOS style file separator
     68
     69        if ($source_filename =~ /^$collect_dir(.*)$/) {
     70        $source_filename = $1;
     71        }
     72    }
     73
     74    $self->set_source_filename ($source_filename);
     75    }
     76
    5977    $self->set_doc_type ($doc_type) if defined $doc_type;
    6078
Note: See TracChangeset for help on using the changeset viewer.