diff options
-rwxr-xr-x | src/build/tools/addCopyright.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/build/tools/addCopyright.pl b/src/build/tools/addCopyright.pl index 022b12214..fd984a9ba 100755 --- a/src/build/tools/addCopyright.pl +++ b/src/build/tools/addCopyright.pl @@ -407,6 +407,14 @@ sub filetype chomp $fileinfo; # Sorted by anticipated frequency of occurrence. + if ( $filename =~ m/\.xml$/i ) + # Added XML file to the top of the list because some comments in + # an XML file cause older versions of 'file' to incorrectly return + # "ASCII C++ program text" even though the file is obviously XML. + # Specifically we are seeing "<!-- // ..." cause this trouble. + { + return "xml" + } if ( ( $filename =~ m/\.[cht]$/i ) ||( $filename =~ m/\.[cht]\+\+$/i ) ||( $filename =~ m/\.[cht]pp$/i ) @@ -486,10 +494,6 @@ sub filetype { return "LinkerScript"; } - if ( $filename =~ m/\.xml$/i ) - { - return "xml" - } if ( $filename =~ m/\.rule$/i ) { return "PrdRuleFile" |