scripts/get_abi.pl: Ignore hidden files
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 29 Jan 2022 00:50:18 +0000 (01:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Feb 2022 15:43:09 +0000 (16:43 +0100)
get_abi.pl currently collects every file in Documentation/ABI. This
causes a UnicodeDecodeError in Documentation/sphinx/kernel_abi.py,
when it finds my Vim swap files (.foo.swp) in the directory.

To avoid such issues, ignore hidden files in get_abi.pl.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20220129005019.2090996-1-j.neuschaefer@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/get_abi.pl

index 6212f58..47b7eca 100755 (executable)
@@ -92,6 +92,7 @@ sub parse_abi {
        my $mode = (stat($file))[2];
        return if ($mode & S_IFDIR);
        return if ($file =~ m,/README,);
+       return if ($file =~ m,/\.,);
 
        my $name = $file;
        $name =~ s,.*/,,;