File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,16 @@ public void ValidateBagitTXT(string bagRoot)
117117 }
118118
119119 if ( ! tags . TryGetValue ( "Tag-File-Character-Encoding" , out var encoding ) )
120+ {
120121 _messageService . Add ( new MessageRecord ( MessageLevel . ERROR , "Tag-File-Character-Encoding key is missing in bagit.txt." ) ) ;
121-
122- if ( ! string . Equals ( encoding , "UTF-8" , StringComparison . OrdinalIgnoreCase ) )
123- _messageService . Add ( new MessageRecord ( MessageLevel . ERROR , $ "Unsupported Tag-File-Character-Encoding: { encoding } ") ) ;
122+ }
123+ else
124+ {
125+ if ( ! string . Equals ( encoding , "UTF-8" , StringComparison . OrdinalIgnoreCase ) )
126+ {
127+ _messageService . Add ( new MessageRecord ( MessageLevel . ERROR , $ "Unsupported Tag-File-Character-Encoding: { encoding } ") ) ;
128+ }
129+ }
124130 }
125131
126132 public bool HasBagInfo ( string bagRoot )
You can’t perform that action at this time.
0 commit comments