summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer/scpzipfiles.pm
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-22 09:24:23 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-22 09:24:23 +0000
commitae34c34e46f4084ac101c18b24d01b0ee69ff541 (patch)
treeeb2982da5ab6157932f02ed6dabab798b9581624 /solenv/bin/modules/installer/scpzipfiles.pm
parentbcd078e8889fa55d7f2871a0343b2f9907a207fe (diff)
#i10000# creating subdirectories for files with scpzip_replace flag
Diffstat (limited to 'solenv/bin/modules/installer/scpzipfiles.pm')
-rw-r--r--solenv/bin/modules/installer/scpzipfiles.pm22
1 files changed, 19 insertions, 3 deletions
diff --git a/solenv/bin/modules/installer/scpzipfiles.pm b/solenv/bin/modules/installer/scpzipfiles.pm
index 0221201af9ac..0b6eef704424 100644
--- a/solenv/bin/modules/installer/scpzipfiles.pm
+++ b/solenv/bin/modules/installer/scpzipfiles.pm
@@ -2,9 +2,9 @@
#
# $RCSfile: scpzipfiles.pm,v $
#
-# $Revision: 1.4 $
+# $Revision: 1.5 $
#
-# last change: $Author: kz $ $Date: 2004-06-18 16:56:08 $
+# last change: $Author: obo $ $Date: 2004-06-22 10:24:23 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -65,6 +65,7 @@ package installer::scpzipfiles;
use installer::files;
use installer::globals;
use installer::logger;
+use installer::pathanalyzer;
use installer::systemactions;
########################################################################################
@@ -142,12 +143,27 @@ sub resolving_scpzip_replace_flag
{
# copy files and edit them with the variables defined in the zip.lst
+ my $longfilename = 0;
+
my $onefilename = $onefile->{'Name'};
my $sourcepath = $onefile->{'sourcepath'};
- $onefilename =~ s/^\s*\Q$installer::globals::separator\E//; # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
+
+ if ( $onefilename =~ /^\s*\Q$installer::globals::separator\E/ ) # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
+ {
+ $onefilename =~ s/^\s*\Q$installer::globals::separator\E//;
+ $longfilename = 1;
+ }
+
my $destinationpath = $replacedir . $onefilename;
my $movepath = $destinationpath . ".orig";
+ if ( $longfilename ) # the destination directory has to be created before copying
+ {
+ my $destdir = $movepath;
+ installer::pathanalyzer::get_path_from_fullqualifiedname(\$destdir);
+ installer::systemactions::create_directory_structure($destdir);
+ }
+
my $copysuccess = installer::systemactions::copy_one_file($sourcepath, $movepath);
if ( $copysuccess )