From 700dd1a79b9ddaf35338c796ec1911fc84ceeca4 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 14 Mar 2008 15:14:44 +0000 Subject: [PATCH] bugfix: save_fai_log with more robustness git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9867 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 2 +- gosa-si/server/events/clMessages.pm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 1374cb0d6..15eb03302 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1038,7 +1038,7 @@ sub save_fai_log { foreach my $log_file (@log_files) { if( $log_file eq "." || $log_file eq ".." ) { next; } - my $log = "log_file:$log_file\n"; + my $log = "log_file:$log_file:"; $log_file = File::Spec->catfile( $fai_log_dir, $log_file ); open(my $FILE, "<$log_file"); if (not defined $FILE ) { diff --git a/gosa-si/server/events/clMessages.pm b/gosa-si/server/events/clMessages.pm index 24ab66829..ed32cb150 100644 --- a/gosa-si/server/events/clMessages.pm +++ b/gosa-si/server/events/clMessages.pm @@ -103,9 +103,11 @@ sub save_fai_log { if (length $log == 0) { next; }; my ($log_file, $log_string) = split("\n", $log, 2); my $client_fai_log_file = File::Spec->catfile( $client_fai_log_dir, $log_file); - open(my $LOG_FILE, ">$client_fai_log_file"); + + open(my $LOG_FILE, ">$client_fai_log_file"); print $LOG_FILE &decode_base64($log_string); close($LOG_FILE); + } return; } -- 2.30.2