Don't close the current sitemap if we never opened one

This commit is contained in:
Mark H. Wood
2013-08-18 16:43:49 -04:00
parent a003b5f955
commit a043338207

View File

@@ -152,7 +152,10 @@ public abstract class AbstractGenerator
*/ */
public int finish() throws IOException public int finish() throws IOException
{ {
closeCurrentFile(); if (null != currentOutput)
{
closeCurrentFile();
}
OutputStream fo = new FileOutputStream(new File(outputDir, OutputStream fo = new FileOutputStream(new File(outputDir,
getIndexFilename())); getIndexFilename()));