- Timestamp:
- 2011-07-29T13:16:32+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BaseMediaConverter.pm
r22431 r24350 84 84 my $outhandle = $self->{'outhandle'}; 85 85 my $base_dir = $self->{'base_dir'}; 86 87 my $collect_dir = $ENV{'GSDLCOLLECTDIR'}; 88 $collect_dir =~ s/\\/\//g; # Work in Unix style world 86 89 90 ## print STDERR "**** base_dir = ", $base_dir, "\n"; 91 87 92 # Work out relative filename within 'base_dir' 88 93 $filename =~ s/\\/\//g; 89 94 my ($file) = ($filename =~ m/^$base_dir(.*?)$/); 90 95 96 if (!defined $file) { 97 # Perhaps the filename is taken from within cache_dir area? 98 my $prev_cached_dir = $self->{'cached_dir'}; 99 ($file) = ($filename =~ m/^$prev_cached_dir(.*?)$/); 100 } 101 91 102 $file =~ s/^\/|\\//; # get rid of leading slash from relative filename 103 92 104 93 105 # Setup cached_dir and file_root … … 96 108 = &File::Basename::fileparse($file, "\\.[^\\.]+\$"); 97 109 98 my $collect_dir = $ENV{'GSDLCOLLECTDIR'};99 $collect_dir =~ s/\\/\//g; # Work in Unix style world100 110 101 111 # if dirname is in collections tmp area, remove collect_dir prefix
Note:
See TracChangeset
for help on using the changeset viewer.