Ignore:
Timestamp:
2013-09-04T21:46:07+12:00 (11 years ago)
Author:
ak19
Message:

No more absolute paths in archiveinf-doc.gdb and archiveinf-src.gdb

Location:
main/trunk/greenstone2/perllib/cgiactions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/explodeaction.pm

    r26567 r28211  
    135135   
    136136    if (defined $src_files) {
    137         foreach my $if (@$src_files) {
    138         $all_import_file_keys{$if} = 1;
     137        foreach my $ifile (@$src_files) {
     138        $ifile = &util::placeholders_to_abspath($ifile);
     139        $all_import_file_keys{$ifile} = 1;
    139140        }
    140141    }
    141142
    142143    if (defined $assoc_files) {
    143         foreach my $if (@$assoc_files) {
    144         $all_import_file_keys{$if} = 1;
     144        foreach my $ifile (@$assoc_files) {
     145        $ifile = &util::placeholders_to_abspath($ifile);
     146        $all_import_file_keys{$ifile} = 1;
    145147        }
    146148    }
     
    175177    my %all_oid_keys = ();
    176178
    177     foreach my $if (@$import_filenames) {
    178         $if = &util::upgrade_if_dos_filename($if);
    179 
    180     print STDERR "*** looking import filename key \"$if\"\n";
    181 
     179    foreach my $ifile (@$import_filenames) {
     180    $ifile = &util::upgrade_if_dos_filename($ifile);
     181    $ifile = &util::abspath_to_placeholders($ifile);
     182
     183    print STDERR "*** looking up import filename key \"$ifile\"\n";
     184   
    182185    my $src_rec
    183186        = &dbutil::read_infodb_entry($infodb_type, $arcinfo_src_filename,
    184                      $if);
     187                     $ifile);
     188
    185189    my $oids = $src_rec->{'oid'};
    186190
  • main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm

    r28160 r28211  
    318318        # This now stores the full pathname
    319319        my $import_filename = $doc_rec->{'src-file'}->[0];
     320        $import_filename = &util::placeholders_to_abspath($import_filename);
    320321
    321322        # figure out correct metadata.xml file [?]
     
    424425        my $doc_rec = &dbutil::read_infodb_entry($infodbtype, $arcinfo_doc_filename, $docid);
    425426        # This now stores the full pathname
    426         my $doc_filename = $doc_rec->{'doc-file'}->[0]; 
     427        my $doc_filename = $doc_rec->{'doc-file'}->[0];
    427428        $doc_filename = &util::filename_cat($archive_dir, $doc_filename);
    428429
     
    793794    # This now stores the full pathname
    794795    $import_filename = $doc_rec->{'src-file'}->[0];
     796    $import_filename = &util::placeholders_to_abspath($import_filename);
    795797
    796798    # figure out correct metadata.xml file [?]
     
    28742876    # This now stores the full pathname
    28752877    $import_filename = $doc_rec->{'src-file'}->[0];
     2878    $import_filename = &util::placeholders_to_abspath($import_filename);
     2879
    28762880    } else { # only for set_import_meta, not the case when calling method is set_import_metadata_array
    28772881         # as the array version of the method doesn't support the -f parameter yet
     
    29622966        # This now stores the full pathname
    29632967        $import_filename = $doc_rec->{'src-file'}->[0];
     2968        $import_filename = &util::placeholders_to_abspath($import_filename);
    29642969    }
    29652970
     
    33933398    # This now stores the full pathname
    33943399    my $import_filename = $archive_doc_rec->{'src-file'}->[0];
     3400    $import_filename = &util::placeholders_to_abspath($import_filename);
    33953401   
    33963402    # figure out correct metadata.xml file [?]
Note: See TracChangeset for help on using the changeset viewer.