Code

bugfix: save_fai_log with more robustness
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 14 Mar 2008 15:14:44 +0000 (15:14 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 14 Mar 2008 15:14:44 +0000 (15:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9867 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-client
gosa-si/server/events/clMessages.pm

index 1374cb0d63a51775d2547100d92d4c9e9b89c1da..15eb03302e47baeb273ea379de7d1a53a79359d0 100755 (executable)
@@ -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 ) {
index 24ab6682902cbbc8a3b8c605beb78b06499c7922..ed32cb150f9df87a7ad9635893c8f5c5c291abf4 100644 (file)
@@ -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;
 }