mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 10:02:02 -04:00
Remove OPDS temp file if there are no changes to the feed
This commit is contained in:
parent
2a1225ca53
commit
c88dc363a2
2 changed files with 4 additions and 3 deletions
|
@ -1,10 +1,7 @@
|
|||
<?
|
||||
use function Safe\apcu_fetch;
|
||||
use function Safe\ksort;
|
||||
use function Safe\natsort;
|
||||
use function Safe\preg_replace;
|
||||
use function Safe\touch;
|
||||
use function Safe\unlink;
|
||||
use function Safe\usort;
|
||||
|
||||
class Library{
|
||||
|
|
|
@ -4,6 +4,7 @@ use function Safe\file_put_contents;
|
|||
use function Safe\preg_replace;
|
||||
use function Safe\rename;
|
||||
use function Safe\tempnam;
|
||||
use function Safe\unlink;
|
||||
|
||||
class OpdsFeed{
|
||||
public $Id;
|
||||
|
@ -87,5 +88,8 @@ class OpdsFeed{
|
|||
|
||||
rename($tempFilename, $path);
|
||||
}
|
||||
else{
|
||||
unlink($tempFilename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue