Changeset 16836

Show
Ignore:
Timestamp:
15.08.2008 17:33:04 (11 years ago)
Author:
ak19
Message:

1. When working out the web_url, it needs to know of any containing directories. These directories may have directory dots in them. These dots are now first evaluated before creating the web_url. This is definitely necessary on Linux. 2. Minor bugfix in eval_dir_dots subroutine so that it does not do a filecat when there is no directory.

Files:
1 modified

Legend:

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

    r16812 r16836  
    708708 
    709709#    print STDERR "#### file: $file\n"; 
     710 
    710711    my ($tailname,$dirname,$suffix) = &File::Basename::fileparse($file, "\\.[^\\.]+\$"); 
    711712    my $utf8_file = $self->filename_to_utf8_metadata($file); 
    712  
    713713    my $web_url = "http://"; 
    714714    if(defined $dirname) { # local directory 
     715    $dirname = $self->eval_dir_dots($dirname); 
    715716    $web_url = $web_url.$dirname.$utf8_file;  
    716717    } else { 
     
    15031504    } 
    15041505    } 
    1505     return &util::filename_cat(@eval_dirs); 
     1506     
     1507    my $evaluated_filename = (scalar @eval_dirs > 0) ? &util::filename_cat(@eval_dirs) : ""; 
     1508    return $evaluated_filename; 
    15061509} 
    15071510