diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-11-21 14:09:53 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-11-21 14:09:53 +0000 |
commit | c654dd49ca04092fe0dd8a5f6d9deb3e19d8166c (patch) | |
tree | 64036b6cffc7072c1f22915a5934a636526486ba /solenv/bin/cwsresync.pl | |
parent | a23ab06c69907b1a2b8d016a802fce307f5320a6 (diff) |
INTEGRATION: CWS ause071 (1.26.138); FILE MERGED
2006/11/09 14:27:48 hjs 1.26.138.1: #141115# keep timestamps for xtrafiles
Diffstat (limited to 'solenv/bin/cwsresync.pl')
-rwxr-xr-x | solenv/bin/cwsresync.pl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/solenv/bin/cwsresync.pl b/solenv/bin/cwsresync.pl index 7590bea16a8b..5661a561eb21 100755 --- a/solenv/bin/cwsresync.pl +++ b/solenv/bin/cwsresync.pl @@ -7,9 +7,9 @@ eval 'exec perl -wS $0 ${1+"$@"}' # # $RCSfile: cwsresync.pl,v $ # -# $Revision: 1.26 $ +# $Revision: 1.27 $ # -# last change: $Author: kz $ $Date: 2006-07-05 21:55:29 $ +# last change: $Author: vg $ $Date: 2006-11-21 15:09:53 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -81,7 +81,7 @@ use CwsConfig; ( my $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/; my $script_rev; -my $id_str = ' $Revision: 1.26 $ '; +my $id_str = ' $Revision: 1.27 $ '; $id_str =~ /Revision:\s+(\S+)\s+\$/ ? ($script_rev = $1) : ($script_rev = "-"); @@ -1075,11 +1075,15 @@ sub relink_cws_action my $c_dir = "$sourceroot/".$cws_master; $destfile =~ s#$m_dir#$c_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); } } |