1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 16:15:55 +00:00

consistency: use DiskCache->exists() to check for present files

This commit is contained in:
Andrew Dolgov
2019-08-14 12:52:41 +03:00
parent 6914ad1f74
commit c34726b2b2
2 changed files with 2 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ class Cache_Starred_Images extends Plugin {
private function cache_url($article_id, $url) {
$local_filename = $article_id . "-" . sha1($url);
if (!$this->cache->getSize($local_filename) >= 0) {
if (!$this->cache->exists($local_filename)) {
Debug::log("cache_images: downloading: $url to $local_filename", Debug::$LOG_VERBOSE);
$data = fetch_file_contents(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]);