summaryrefslogtreecommitdiff
path: root/Build-tools
diff options
context:
space:
mode:
authorunknown <joerg@mysql.com>2005-02-10 14:33:27 +0100
committerunknown <joerg@mysql.com>2005-02-10 14:33:27 +0100
commit2e480773c87c52ba0eb0a5ba9acdf75414f75059 (patch)
tree9593a9891b5cd6b6b1038ff1e64e58e84623871c /Build-tools
parent1b17ba5244d654cdcc5171fbd6e777e5a1a2f34a (diff)
downloadmariadb-git-2e480773c87c52ba0eb0a5ba9acdf75414f75059.tar.gz
Change 'Build-tools/Do-compile' from 'system("rm -f ...");' to 'unlink()' to ensure
it also works on file names with special characters. Build-tools/Do-compile: Ever and again, some test creates a file name with special characters that need to be escaped when passed to the shell; as this is not done, 'system("rm -f ...");' fails on them, the old test tree is not deleted, and the build fails. Prevent this by changing to Perl 'unlink()' which does not need escaping.
Diffstat (limited to 'Build-tools')
-rwxr-xr-xBuild-tools/Do-compile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index af03f3209aa..1f83a9a37e1 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -729,7 +729,7 @@ sub find
sub rm_all
{
my(@rm_files)=@_;
- my($dir,$current_dir,@files,@dirs);
+ my($dir,$current_dir,@files,@dirs,$removed);
$current_dir = `pwd`; chomp($current_dir);
foreach $dir (@rm_files)
@@ -753,7 +753,9 @@ sub rm_all
}
if ($#files >= 0)
{
- system("rm -f " . join(" ",@files)) && abort("Can't remove files from $dir");
+ $removed= unlink @files;
+ print "rm_all : removed $removed files in $current_dir/$dir\n" if ($opt_debug);
+ abort("Can't remove all $#files+1 from $current_dir/$dir, just $removed") if $removed != $#files+1;
}
foreach $dir (@dirs)
{