Strip any trailing slash on destination argument
[git.git] / git-mv.perl
index 17e35b0..a21d87e 100755 (executable)
@@ -54,6 +54,8 @@ my ($src, $dst, $base, $dstDir);
 my $argCount = scalar @ARGV;
 if (-d $ARGV[$argCount-1]) {
        $dstDir = $ARGV[$argCount-1];
+       # remove any trailing slash
+       $dstDir =~ s/\/$//;
        @srcArgs = @ARGV[0..$argCount-2];
        
        foreach $src (@srcArgs) {