INTEGRATION: CWS ause071 (1.21.138); FILE MERGED
2006/11/09 14:37:47 hjs 1.21.138.2: #141115# create directory instead of silently ignoring copy task 2006/10/16 15:10:35 hjs 1.21.138.1: #141115# still not perfect for links
This commit is contained in:
parent
ffa9809b95
commit
a23ab06c69
1 changed files with 10 additions and 6 deletions
|
@ -7,9 +7,9 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||
#
|
||||
# $RCSfile: cwscreate.pl,v $
|
||||
#
|
||||
# $Revision: 1.21 $
|
||||
# $Revision: 1.22 $
|
||||
#
|
||||
# last change: $Author: kz $ $Date: 2006-07-05 21:55:17 $
|
||||
# last change: $Author: vg $ $Date: 2006-11-21 15:09:41 $
|
||||
#
|
||||
# The Contents of this file are made available subject to
|
||||
# the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -75,7 +75,7 @@ $SIG{'INT'} = 'INT_handler' if defined($log);
|
|||
( my $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
|
||||
|
||||
my $script_rev;
|
||||
my $id_str = ' $Revision: 1.21 $ ';
|
||||
my $id_str = ' $Revision: 1.22 $ ';
|
||||
$id_str =~ /Revision:\s+(\S+)\s+\$/
|
||||
? ($script_rev = $1) : ($script_rev = "-");
|
||||
|
||||
|
@ -526,11 +526,15 @@ sub copy_workspace
|
|||
my $destfile = $onefile;
|
||||
$destfile =~ s#$wslocation/$master#$dir#;
|
||||
|
||||
if ( -d dirname( $destfile ))
|
||||
if ( ! -d dirname( $destfile ))
|
||||
{
|
||||
$result = copy $onefile, $destfile;
|
||||
if ( !$result ){ print_error ("Copying $onefile to CWS failed: $!", 1) };
|
||||
mkdir dirname( $destfile );
|
||||
}
|
||||
$result = copy $onefile, $destfile;
|
||||
if ( !$result ){ print_error ("Copying $onefile to CWS failed: $!", 1) };
|
||||
# preserve timestamp
|
||||
my @from_stat = stat($onefile);
|
||||
utime($from_stat[9], $from_stat[9], $destfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue