summaryrefslogtreecommitdiff
path: root/plugins/cache_starred_images
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-14 12:52:41 +0300
committerAndrew Dolgov <[email protected]>2019-08-14 12:52:41 +0300
commitc34726b2b2182ed38b86d33978c4e996893124d8 (patch)
treeed971a99f1ccd7e64dfa5388756b01f20ae7c124 /plugins/cache_starred_images
parent6914ad1f741570b66580d2933e8e2118adb177b5 (diff)
consistency: use DiskCache->exists() to check for present files
Diffstat (limited to 'plugins/cache_starred_images')
-rwxr-xr-xplugins/cache_starred_images/init.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index d13b0a443..ae369f56e 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -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]);