solenv-installer-cleaner-paths.diff: do not create '.' subdirectories

omit './' in paths
This commit is contained in:
Petr Mladek 2011-03-30 17:19:03 +02:00
parent 6751ae5b08
commit 985532f27c

View file

@ -719,8 +719,16 @@ sub install_simple ($$$$$$)
if ((!($dir =~ /\bPREDEFINED_/ )) || ( $dir =~ /\bPREDEFINED_PROGDIR\b/ ))
{
mkdir $destdir . $onedir->{'HostName'};
push @lines, "%dir " . $onedir->{'HostName'} . "\n";
my $hostname = $onedir->{'HostName'};
# ignore '.' subdirectories
next if ( $hostname =~ m/\.$/ );
# remove './' from the path
$hostname =~ s/\.\///g;
# printf "mkdir $destdir$hostname\n";
mkdir $destdir . $hostname;
push @lines, "%dir " . $hostname . "\n";
}
}
@ -737,6 +745,10 @@ sub install_simple ($$$$$$)
$destination =~ s/\$\$/\$/;
$sourcepath =~ s/\$\$/\$/;
# remove './' from the path
$sourcepath =~ s/\.\///g;
$destination =~ s/\.\///g;
push @lines, "$destination\n";
if(-d "$destdir$destination"){
rmtree("$destdir$destination");