Changeset 3629
- Timestamp:
- 2002-12-10T17:44:16+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/GAPlug.pm
r3540 r3629 149 149 $self->{'doc_obj'}->get_metadata($self->{'doc_obj'}->get_top_section(), "gsdlassocfile"); 150 150 151 my $parent_dir = $self->{'filename'}; 152 $parent_dir =~ s/[^\\\/]*$//; 151 # for when "assocfilepath" isn't the same directory that doc.xml is in... 152 my $assoc_filepath_list= $self->{'doc_obj'}->get_metadata($self->{'doc_obj'}->get_top_section(), "assocfilepath"); 153 154 my $assoc_filepath=shift (@$assoc_filepath_list); 155 if (defined ($assoc_filepath)) { 156 # make absolute rather than relative... 157 $self->{'filename'} =~ m@^(.*[\\/]archives)@; 158 $assoc_filepath = "$1/$assoc_filepath/"; 159 } else { 160 $assoc_filepath = $self->{'filename'}; 161 $assoc_filepath =~ s/[^\\\/]*$//; 162 } 153 163 154 164 foreach my $assoc_file_info (@$assoc_files) { 155 165 my ($assoc_file, $mime_type, $dir) = split (":", $assoc_file_info); 156 my $real_dir = &util::filename_cat($ parent_dir, $assoc_file),166 my $real_dir = &util::filename_cat($assoc_filepath, $assoc_file), 157 167 my $assoc_dir = (defined $dir && $dir ne "") 158 168 ? &util::filename_cat($dir, $assoc_file) : $assoc_file;
Note:
See TracChangeset
for help on using the changeset viewer.