get_maintainer: fix unexpected behavior for path/to//file (double slashes)
[sfrench/cifs-2.6.git] / scripts / get_maintainer.pl
index 6d973f3685f977b58c7180be0595c0f1b6c5cffc..484d2fbf5921dbd105b8feaf8c028f8646b46738 100755 (executable)
@@ -19,6 +19,7 @@ my $V = '0.26';
 use Getopt::Long qw(:config no_auto_abbrev);
 use Cwd;
 use File::Find;
+use File::Spec::Functions;
 
 my $cur_path = fastgetcwd() . '/';
 my $lk_path = "./";
@@ -532,6 +533,7 @@ if (!@ARGV) {
 
 foreach my $file (@ARGV) {
     if ($file ne "&STDIN") {
+       $file = canonpath($file);
        ##if $file is a directory and it lacks a trailing slash, add one
        if ((-d $file)) {
            $file =~ s@([^/])$@$1/@;