From: rettenbe Date: Fri, 5 Dec 2008 14:10:46 +0000 (+0000) Subject: fixes save_log problem X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aacc97065cef22d1a67f2372a0c0e2dee3a813d1;p=gosa.git fixes save_log problem git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13170 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);