Changeset 13770


Ignore:
Timestamp:
2007-01-24T10:08:17+13:00 (17 years ago)
Author:
shaoqun
Message:

now use the absolute source path to get the last modified time

File:
1 edited

Legend:

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

    r13172 r13770  
    5050    my ($source_filename, $doc_type) = @_;
    5151
     52
    5253    my $self = bless {'associated_files'=>[],
    5354              'subsection_order'=>[],
     
    6061    # used to set lastmodified here, but this can screw up the HASH ids, so
    6162    # the docsave processor now calls set_lastmodified
     63
     64    $self->{'source_path'} = $source_filename;
    6265   
    6366    if (defined $source_filename) {
     
    98101    my $self = shift (@_);
    99102
    100     my $source_filename = $self->get_source_filename();
    101     if ((defined $self->get_metadata_element ($self->get_top_section(), "gsdldoctype")) &&
    102     (defined $source_filename) && (-e $source_filename)) {
    103     my $file_stat = stat($source_filename);
     103    my $source_path = $self->{'source_path'};
     104   
     105    if (defined $source_path && (-e $source_path)) {
     106
     107        my $file_stat = stat($source_path);
    104108    my $mtime = $file_stat->mtime;
    105109    $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime);
Note: See TracChangeset for help on using the changeset viewer.