From: Moritz Bunkus Date: Fri, 11 May 2007 11:46:02 +0000 (+0000) Subject: Argumente von open() definitiv auf den richtigen Pfad beschränken. X-Git-Tag: release-2.4.3^2~345 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ebacee0a54bad3082004f93d64bf450a835db72c;p=kivitendo-erp.git Argumente von open() definitiv auf den richtigen Pfad beschränken. --- diff --git a/SL/Locale.pm b/SL/Locale.pm index e941f003a..a6756fefe 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -47,10 +47,14 @@ sub new { my ($type, $country, $NLS_file) = @_; my $self = {}; + $country =~ s|.*/||; + $country =~ s|\.||g; + $NLS_file =~ s|.*/||; + if ($country && -d "locale/$country") { local *IN; $self->{countrycode} = $country; - if (open(IN, "locale/$country/$NLS_file")) { + if (open(IN, "<", "locale/$country/$NLS_file")) { my $code = join("", ); eval($code); close(IN);