diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-09-05 15:23:24 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-09-05 15:23:24 +0000 |
commit | 4ddd1ea0db8db08b57e8fa2f1ff896978749181b (patch) | |
tree | e38abcb8017f608f71f3bebaa8768f6da298e98a /solenv/bin/modules/packager | |
parent | 2aa14ea48f9baef5d5f71a79402901b848826ae3 (diff) |
#i10000# if a file cannot be opened try again
Diffstat (limited to 'solenv/bin/modules/packager')
-rw-r--r-- | solenv/bin/modules/packager/files.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/solenv/bin/modules/packager/files.pm b/solenv/bin/modules/packager/files.pm index 28a0f59b2ae9..8fcd23cd7880 100644 --- a/solenv/bin/modules/packager/files.pm +++ b/solenv/bin/modules/packager/files.pm @@ -2,9 +2,9 @@ # # $RCSfile: files.pm,v $ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # -# last change: $Author: obo $ $Date: 2004-11-18 08:41:47 $ +# last change: $Author: obo $ $Date: 2005-09-05 16:23:24 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -83,7 +83,11 @@ sub read_file { my ($localfile) = @_; - open( IN, $localfile ) || packager::exiter::exit_program("ERROR: Cannot open file: $localfile", "read_file"); + if ( ! open( IN, $localfile ) ) { + # try again - sometimes we get errors caused by race conditions in parallel builds + sleep 1; + open( IN, $localfile ) or packager::exiter::exit_program("ERROR: Cannot open file: $localfile", "read_file"); + } my @localfile = <IN>; close( IN ); |