Changeset 20001

Show
Ignore:
Timestamp:
17.07.2009 10:15:31 (10 years ago)
Author:
davidb
Message:

When testing on Windows, discovered drive letter at start of filename caused problems. Now fixed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/BaseMediaConverter.pm

    r18555 r20001  
    9898 
    9999    my $collect_dir = $ENV{'GSDLCOLLECTDIR'}; 
     100    $collect_dir =~ s/\\/\//g; # Work in Unix style world 
     101 
     102    # if dirname is in collections tmp area, remove collect_dir prefix 
     103    $dirname =~ s/^$collect_dir//; 
     104 
     105    if ($ENV{'GSDLOS'} eq "windows") { 
     106    # if dirname starts with Windows drive letter, strip it off 
     107    $dirname =~ s/^[a-z]:\///i; 
     108    } 
     109 
    100110    my $base_output_dir = &util::filename_cat($collect_dir,"cached",$dirname); 
    101111 
     
    117127 
    118128    $self->{'cached_dir'} = $output_dir; 
    119     $self->{'cached_file_root'} = $file_root; 
    120      
     129    $self->{'cached_file_root'} = $file_root;     
    121130} 
    122131