mirror of
https://github.com/curl/curl.git
synced 2026-05-30 07:37:33 +03:00
runner.pm: use dirname() in singletest_prepare()
Replacing a regex, for portability. Reported-by: Stefan Eissing Bug: https://github.com/curl/curl/issues/17871#issuecomment-3051830614 Cherry-picked from #17877 Closes #17900
This commit is contained in:
parent
af81e8fe5f
commit
245783338c
1 changed files with 3 additions and 3 deletions
|
|
@ -38,6 +38,8 @@ use strict;
|
|||
use warnings;
|
||||
use 5.006;
|
||||
|
||||
use File::Basename;
|
||||
|
||||
BEGIN {
|
||||
use base qw(Exporter);
|
||||
|
||||
|
|
@ -765,9 +767,7 @@ sub singletest_prepare {
|
|||
my $fileContent = join('', @inputfile);
|
||||
|
||||
# make directories if needed
|
||||
my $path = $filename;
|
||||
# cut off the file name part
|
||||
$path =~ s/^(.*)\/[^\/]*/$1/;
|
||||
my $path = dirname($filename);
|
||||
my @ldparts = split(/\//, $LOGDIR);
|
||||
my $nparts = @ldparts;
|
||||
my @parts = split(/\//, $path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue