Author: af Date: Tue Dec 17 15:47:29 2013 New Revision: 1551588 URL: http://svn.apache.org/r1551588 Log: 123531: Create log path before using it.
Modified: openoffice/trunk/main/solenv/bin/patch_tool.pl Modified: openoffice/trunk/main/solenv/bin/patch_tool.pl URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/patch_tool.pl?rev=1551588&r1=1551587&r2=1551588&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/patch_tool.pl (original) +++ openoffice/trunk/main/solenv/bin/patch_tool.pl Tue Dec 17 15:47:29 2013 @@ -2203,9 +2203,9 @@ sub UpdateReleasesXML($$) sub main () { my $context = ProcessCommandline(); - installer::logger::starttime(); - $installer::logger::Global->add_timestamp("starting logging"); -# installer::logger::SetupSimpleLogging(undef); +# installer::logger::starttime(); +# $installer::logger::Global->add_timestamp("starting logging"); + installer::logger::SetupSimpleLogging(undef); die "ERROR: list file is not defined, please use --lst-file option" unless defined $context->{'lst-file'}; @@ -2222,15 +2222,19 @@ sub main () if ($context->{'command'} =~ /create|check/) { - $installer::logger::Lang->set_filename( - File::Spec->catfile( - $context->{'output-path'}, - $context->{'product-name'}, - "msp", - $context->{'source-version-dash'} . "_" . $context->{'target-version-dash'}, - $context->{'language'}, - "log", - "patch-creation.log")); + my $filename = File::Spec->catfile( + $context->{'output-path'}, + $context->{'product-name'}, + "msp", + $context->{'source-version-dash'} . "_" . $context->{'target-version-dash'}, + $context->{'language'}, + "log", + "patch-creation.log"); + my $dirname = dirname($filename); + File::Path::make_path($dirname) unless -d $dirname; + printf("directing output to $filename\n"); + + $installer::logger::Lang->set_filename($filename); $installer::logger::Lang->copy_lines_from($installer::logger::Global); $installer::logger::Lang->set_forward(undef); $installer::logger::Info->set_forward($installer::logger::Lang);