fix cumulative effect

This commit is contained in:
quenousimporte 2024-06-12 10:54:32 +02:00
parent 7c2d9c92d3
commit 545507773a
1 changed files with 12 additions and 3 deletions

View File

@ -19,10 +19,17 @@
function write_epub($epub) function write_epub($epub)
{ {
if ( ! $epub->error ) { if (file_exists($epub->epub_file))
{
unlink($epub->epub_file);
}
if (!$epub->error)
{
$epub->CreateEPUB(); $epub->CreateEPUB();
if ( ! $epub->error ) { if (!$epub->error)
{
echo 'Success: <a href="' . $epub->epub_file . '">' . $epub->epub_file . '</a> created.<br>'; echo 'Success: <a href="' . $epub->epub_file . '">' . $epub->epub_file . '</a> created.<br>';
} }
else else
@ -30,7 +37,9 @@
echo $epub->error; echo $epub->error;
} }
} else { }
else
{
echo $epub->error; echo $epub->error;
} }
} }