From 3366ac1b7715c7784b7637acb110690dfb22e4e6 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 22 Jan 2007 13:47:37 +0000 Subject: [PATCH] INTEGRATION: CWS native76 (1.4.560); FILE MERGED 2007/01/09 12:33:52 is 1.4.560.1: #i73177# parallel creation of directory possible --- solenv/bin/modules/pre2par/systemactions.pm | 24 ++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/solenv/bin/modules/pre2par/systemactions.pm b/solenv/bin/modules/pre2par/systemactions.pm index 660e1c91e114..8f384b1b6710 100644 --- a/solenv/bin/modules/pre2par/systemactions.pm +++ b/solenv/bin/modules/pre2par/systemactions.pm @@ -4,9 +4,9 @@ # # $RCSfile: systemactions.pm,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: rt $ $Date: 2005-09-08 09:32:29 $ +# last change: $Author: obo $ $Date: 2007-01-22 14:47:37 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -49,6 +49,7 @@ sub create_directory my ($directory) = @_; my $returnvalue = 1; + my $infoline = ""; if (!(-d $directory)) { @@ -67,9 +68,26 @@ sub create_directory } else { - pre2par::exiter::exit_program("Error: Could not create directory: $directory", "create_directory"); + # New solution in parallel packing: It is possible, that the directory now exists, although it + # was not created in this process. There is only an important error, if the directory does not + # exist now. + + if (!(-d $directory)) + { + pre2par::exiter::exit_program("Error: Could not create directory: $directory", "create_directory"); + } + else + { + $infoline = "\nAnother process created this directory in exactly this moment :-) : $directory\n"; + push(@pre2par::globals::logfileinfo, $infoline); + } } } + else + { + $infoline = "\nAlready existing directory, did not create: $directory\n"; + push(@pre2par::globals::logfileinfo, $infoline); + } } #######################################################################