]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-send-email.perl
Merge branch 'js/mingw-rename-fix' into maint
[thirdparty/git.git] / git-send-email.perl
index 2e4a44ad29c923eb48c3136e768870e384df06c2..18529c76e665e613d9c116e32da6acf31b3eac6a 100755 (executable)
@@ -407,10 +407,9 @@ for my $f (@ARGV) {
 
                push @files, grep { -f $_ } map { +$f . "/" . $_ }
                                sort readdir(DH);
-
+               closedir(DH);
        } elsif (-f $f or -p $f) {
                push @files, $f;
-
        } else {
                print STDERR "Skipping $f - not found.\n";
        }
@@ -882,7 +881,7 @@ foreach my $t (@files) {
                                }
                                elsif (/^Content-type:/i) {
                                        $has_content_type = 1;
-                                       if (/charset="?[^ "]+/) {
+                                       if (/charset="?([^ "]+)/) {
                                                $body_encoding = $1;
                                        }
                                        push @xh, $_;