From: Daniel Stenberg Date: Thu, 13 Jul 2023 11:50:31 +0000 (+0200) Subject: checksrc: quote the file name to work with "funny" letters X-Git-Tag: curl-8_2_0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87e0921e0603ac7d7bf95a2569515ecd1286012;p=thirdparty%2Fcurl.git checksrc: quote the file name to work with "funny" letters Closes #11437 --- diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl index c1ee27966e..c44dbce37a 100755 --- a/scripts/checksrc.pl +++ b/scripts/checksrc.pl @@ -912,12 +912,12 @@ sub scanfile { @copyright = sort {$$b{year} cmp $$a{year}} @copyright; # if the file is modified, assume commit year this year - if(`git status -s -- $file` =~ /^ [MARCU]/) { + if(`git status -s -- "$file"` =~ /^ [MARCU]/) { $commityear = (localtime(time))[5] + 1900; } else { # min-parents=1 to ignore wrong initial commit in truncated repos - my $grl = `git rev-list --max-count=1 --min-parents=1 --timestamp HEAD -- $file`; + my $grl = `git rev-list --max-count=1 --min-parents=1 --timestamp HEAD -- "$file"`; if($grl) { chomp $grl; $commityear = (localtime((split(/ /, $grl))[0]))[5] + 1900;