Commit 8beb8780 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Check if the extra chunk file exists before deleting it.

parent 1f6d0f99
......@@ -410,7 +410,9 @@ function xmlsitemap_regenerate_batch_generate($smid, array &$context) {
else {
// Cleanup the 'extra' empty file.
$file = xmlsitemap_sitemap_get_file($sitemap, $sitemap['chunks']);
file_unmanaged_delete($file);
if (file_exists($file)) {
file_unmanaged_delete($file);
}
$sitemap['chunks']--;
// Save the updated chunks and links values.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment