get_maintainer: fix unexpected behavior for path/to//file (double slashes)
[linux-2.6-microblaze.git] / scripts / get_maintainer.pl
index 6d973f3..484d2fb 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/@;