summaryrefslogtreecommitdiff
path: root/solenv/bin/cwscreate.pl
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-21 14:09:41 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-21 14:09:41 +0000
commita23ab06c69907b1a2b8d016a802fce307f5320a6 (patch)
tree0c21235f2922997cf110296c06bef0550c0a18a6 /solenv/bin/cwscreate.pl
parentffa9809b958c208eed5393ad0c93106b03032693 (diff)
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
Diffstat (limited to 'solenv/bin/cwscreate.pl')
-rwxr-xr-xsolenv/bin/cwscreate.pl16
1 files changed, 10 insertions, 6 deletions
diff --git a/solenv/bin/cwscreate.pl b/solenv/bin/cwscreate.pl
index cb6d7b390958..7b76ba0031e2 100755
--- a/solenv/bin/cwscreate.pl
+++ b/solenv/bin/cwscreate.pl
@@ -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);
}
}
}