solenv-installer-cleaner-paths.diff: do not create '.' subdirectories
omit './' in paths
This commit is contained in:
parent
6751ae5b08
commit
985532f27c
1 changed files with 14 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue