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
This commit is contained in:
parent
6ddff8804f
commit
3366ac1b77
1 changed files with 21 additions and 3 deletions
|
@ -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))
|
||||
{
|
||||
|
@ -66,9 +67,26 @@ sub create_directory
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue