summaryrefslogtreecommitdiffstats
path: root/lib/MDK/Common
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-03-11 10:31:48 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-03-11 10:31:48 +0000
commitb49a30481e1455cc938f20714cd64c34e872546f (patch)
tree070f26c81e025d3ec4726e8e2417f717921a9ef9 /lib/MDK/Common
parentd1aaeb46ed5fc7609199c491627abdc16970d0b2 (diff)
downloadperl-MDK-Common-b49a30481e1455cc938f20714cd64c34e872546f.tar
perl-MDK-Common-b49a30481e1455cc938f20714cd64c34e872546f.tar.gz
perl-MDK-Common-b49a30481e1455cc938f20714cd64c34e872546f.tar.bz2
perl-MDK-Common-b49a30481e1455cc938f20714cd64c34e872546f.tar.xz
perl-MDK-Common-b49a30481e1455cc938f20714cd64c34e872546f.zip
- quote correctly ' inside ''
Diffstat (limited to 'lib/MDK/Common')
-rw-r--r--lib/MDK/Common/System.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm
index 419a8d4..05003bb 100644
--- a/lib/MDK/Common/System.pm
+++ b/lib/MDK/Common/System.pm
@@ -371,7 +371,7 @@ sub setVarsInSh {
sub quoteForSh {
my ($val) = @_;
if ($val =~ /["`\$]/) {
- $val =~ s/(')/\\$1/g;
+ $val =~ s/(')/$1\\$1$1/g;
$val = qq('$val');
} elsif ($val =~ /[\(\)'|\s\\;<>&#\[\]~{}*?]/) {
$val = qq("$val");