From aacc97065cef22d1a67f2372a0c0e2dee3a813d1 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 5 Dec 2008 14:10:46 +0000 Subject: [PATCH] fixes save_log problem git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13170 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 3b5cd8b7e..277d2555e 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -895,7 +895,7 @@ sub save_fai_log { my $log_dir = File::Spec->catdir($fai_log_dir, "localhost/last"); - if (not -r -d $log_dir) { + if (not -d $log_dir) { daemon_log("ERROR: cannot open directory $log_dir", 1); return; } @@ -911,19 +911,17 @@ sub save_fai_log { my $log = "log_file:$log_file:"; $log_file = File::Spec->catfile( $log_dir, $log_file ); - if (not -r -f $log_file) { + if (not -f $log_file) { daemon_log("ERROR: cannot read $log_file", 1); next; } - if (-r -f $log_file) { - open(FILE, "<$log_file"); - my @lines = ; - close (FILE); - my $log_string = join("", @lines); - $log .= &encode_base64($log_string); - push(@log_list, $log); - } + open(FILE, "<$log_file"); + my @lines = ; + close (FILE); + my $log_string = join("", @lines); + $log .= &encode_base64($log_string); + push(@log_list, $log); } my $all_log_string = join("\n", @log_list); -- 2.30.2