Fixed validate 'doesn't append, it clobbers' warning when *.rawappend is present

This commit is contained in:
Vhati 2014-10-22 22:12:38 -04:00
parent 14428924f1
commit 840fbd15af

View file

@ -464,12 +464,16 @@ public class ModUtilities {
boolean isTxt = innerPath.matches( "^.*(?:[.]txt)$" ); boolean isTxt = innerPath.matches( "^.*(?:[.]txt)$" );
boolean isXML = innerPath.matches( "^.*(?:[.]xml[.]append|[.]append[.]xml|[.]xml)$" ); boolean isXML = innerPath.matches( "^.*(?:[.]xml[.]append|[.]append[.]xml|[.]xml)$" );
boolean isXMLAppend = innerPath.matches( "^.*(?:[.]xml[.]append|[.]append[.]xml)$" );
if ( innerPath.matches( "^.*(?:[.]xml[.]rawappend|[.]rawappend[.]xml)$" ) || if ( innerPath.matches( "^.*(?:[.]xml[.]append|[.]append[.]xml)$" ) ) {
innerPath.matches( "^.*(?:[.]xml[.]rawclobber|[.]rawclobber[.]xml)$" ) ) { seenAppend = true;
}
isXML = false; // Raw xml is exempt from normal processing. else if ( innerPath.matches( "^.*(?:[.]xml[.]rawappend|[.]rawappend[.]xml)$" ) ) {
isXML = false; // Raw XML is exempt from normal processing.
seenAppend = true;
}
else if ( innerPath.matches( "^.*(?:[.]xml[.]rawclobber|[.]rawclobber[.]xml)$" ) ) {
isXML = false;
} }
DecodeResult decodeResult = ModUtilities.decodeText( zis, modFile.getName()+":"+innerPath ); DecodeResult decodeResult = ModUtilities.decodeText( zis, modFile.getName()+":"+innerPath );
@ -555,8 +559,6 @@ public class ModUtilities {
// TODO: Nag if there are chars FTL can't show. // TODO: Nag if there are chars FTL can't show.
if ( isXML ) { if ( isXML ) {
if ( isXMLAppend ) seenAppend = true;
Report xmlReport = validateModXML( decodeResult.text ); Report xmlReport = validateModXML( decodeResult.text );
if ( xmlReport.messages.size() > 0 ) { if ( xmlReport.messages.size() > 0 ) {