From fbd01364c19ae4bf20d152c11f25b3f865443e11 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 8 Aug 2009 19:23:59 +0000 Subject: [PATCH] Allow forward slashes in Windows-style full paths git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13811 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 7d0baa23..2d32e250 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -5335,12 +5335,13 @@ sub set_defaults { # the SM directory tree, the SM_PATH variable will be # prepended to the path, if not, then the path will be # converted to an absolute path, e.g. -# '../images/logo.gif' --> SM_PATH . 'images/logo.gif' -# '../../someplace/data' --> '/absolute/path/someplace/data' -# 'images/logo.gif' --> SM_PATH . 'config/images/logo.gif' -# '/absolute/path/logo.gif' --> '/absolute/path/logo.gif' -# 'http://whatever/' --> 'http://whatever' -# $some_var/path --> "$some_var/path" +# '../images/logo.gif' --> SM_PATH . 'images/logo.gif' +# '../../someplace/data' --> '/absolute/path/someplace/data' +# 'images/logo.gif' --> SM_PATH . 'config/images/logo.gif' +# '/absolute/path/logo.gif' --> '/absolute/path/logo.gif' +# 'C:\absolute\path\logo.gif' --> 'C:\absolute\path\logo.gif' +# 'http://whatever/' --> 'http://whatever' +# $some_var/path --> "$some_var/path" sub change_to_SM_path() { my ($old_path) = @_; my $new_path = ''; @@ -5351,7 +5352,7 @@ sub change_to_SM_path() { # If the path is absolute, don't bother. return "\'" . $old_path . "\'" if ( $old_path eq ''); return "\'" . $old_path . "\'" if ( $old_path =~ /^(\/|http)/ ); - return "\'" . $old_path . "\'" if ( $old_path =~ /^\w:\// ); + return "\'" . $old_path . "\'" if ( $old_path =~ /^\w:(\\|\/)/ ); return $old_path if ( $old_path =~ /^\'(\/|http)/ ); return $old_path if ( $old_path =~ /^\'\w:\// ); return $old_path if ( $old_path =~ /^SM_PATH/); -- 2.25.1