diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-05-08 14:55:43 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-05-08 14:55:43 +0000 |
commit | 99921856cc2c4c9ff34db18212f3b93b580e2028 (patch) | |
tree | 0ceae3bc54e6b340423bab495c93be9ecf1959ac /config_office | |
parent | cd81bdf26ad04ecdb492cc61306e9c7448f801f6 (diff) |
INTEGRATION: CWS vq31 (1.101.6); FILE MERGED
2006/05/07 04:39:10 vq 1.101.6.1: #i65084# Fix set_soenv problem for cygwin with pathes with spaces.
Diffstat (limited to 'config_office')
-rw-r--r-- | config_office/set_soenv.in | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/config_office/set_soenv.in b/config_office/set_soenv.in index 983963c63a8e..645eecedf7bc 100644 --- a/config_office/set_soenv.in +++ b/config_office/set_soenv.in @@ -1,8 +1,8 @@ #!@PERL@ -w # # Program: set_soenv.in -# Version: $Revision: 1.103 $ -# Date: $Date: 2006-05-04 09:25:34 $ +# Version: $Revision: 1.104 $ +# Date: $Date: 2006-05-08 15:55:43 $ # Author: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems, Ireland. # #--------------------------------------------------------------------------- @@ -1149,7 +1149,6 @@ elsif ($platform =~ m/cygwin/) my $expandedPATH = $PATH; $expandedPATH =~ s/(\$\w+)/$1/eeg; foreach my $pathentry (split($ps,$noldPATH)) { - print($pathentry."\n"); if ( ! ( $expandedPATH =~ /(?:$ps|\A)(?:$pathentry)(?:$ps|\Z)/ ) ) { $PATH .= $ps.$pathentry; $expandedPATH .= $ps.$pathentry; @@ -2209,7 +2208,7 @@ sub ToFile { #---------------------------------------------------------- # Function name: PosixFormat # Description: Format variables to Posix Style Format. Should only be used -# with DOS-style path variables +# with DOS-style path variables. # Arguments: 1. Variable (string) # Return value: Reformatted String #---------------------------------------------------------- @@ -2231,10 +2230,13 @@ sub PosixFormat # Search for posix path :path with space: and replace with short dos path while ( $variable =~ /(?::|\A)[\'\"]?([^:]+ [^:]+)[\'\"]?(?::|\Z)/ ) { - $d1 = $1 ; - chomp( $d2 = qx{cygpath -d "$d1"} ) || die( "Path with space: $1 propably doesn't exist!" ); - chomp( $d2 = qx{cygpath -u "$d2"} ) ; - $variable =~ s/\Q$d1\E/$d2/ ; + $d1 = $1 ; + if ( $d1 =~ m/"$/ ) { die( "A part of $variable is enclosed in quotes, fix this!"); } + chomp( $d2 = qx{cygpath -d "$d1"} ) || die( "Path with space: $1 propably doesn't exist!" ); + # Be arefull with \s + $d2 =~ s/\\/\\\\/g; + chomp( $d2 = qx{cygpath -u "$d2"} ) ; + $variable =~ s/\Q$d1\E/$d2/ ; } } return $variable; |