Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be17bddc authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

scripts/get_maintainer.pl: handle file names beginning with ./



The problem is that get_maintainer.pl doesn't work if you have a ./
prefix on the filename.  For example, if you type:

  ./scripts/get_maintainer.pl -f ./drivers/usb/usb-skeleton.c

then the current code only includes LKML and people from the git log, it
doesn't include Greg or the linux-usb list.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 75339d82
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -16,7 +16,9 @@ my $P = $0;
my $V = '0.26';
my $V = '0.26';


use Getopt::Long qw(:config no_auto_abbrev);
use Getopt::Long qw(:config no_auto_abbrev);
use Cwd;


my $cur_path = fastgetcwd() . '/';
my $lk_path = "./";
my $lk_path = "./";
my $email = 1;
my $email = 1;
my $email_usename = 1;
my $email_usename = 1;
@@ -429,6 +431,8 @@ foreach my $file (@ARGV) {
	}
	}
    }
    }
    if ($from_filename) {
    if ($from_filename) {
	$file =~ s/^\Q${cur_path}\E//;	#strip any absolute path
	$file =~ s/^\Q${lk_path}\E//;	#or the path to the lk tree
	push(@files, $file);
	push(@files, $file);
	if ($file ne "MAINTAINERS" && -f $file && ($keywords || $file_emails)) {
	if ($file ne "MAINTAINERS" && -f $file && ($keywords || $file_emails)) {
	    open(my $f, '<', $file)
	    open(my $f, '<', $file)