From ebacee0a54bad3082004f93d64bf450a835db72c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 11 May 2007 11:46:02 +0000 Subject: [PATCH] =?utf8?q?Argumente=20von=20open()=20definitiv=20auf=20den?= =?utf8?q?=20richtigen=20Pfad=20beschr=C3=A4nken.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Locale.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.20.1