diff --git a/CImage.php b/CImage.php index e301694..86c70ab 100644 --- a/CImage.php +++ b/CImage.php @@ -473,8 +473,13 @@ class CImage public function downloadRemoteSource($src) { $remote = new CRemoteImage(); + $cache = $this->saveFolder . "/remote/"; + + if (!is_dir($cache)) { + mkdir($cache); + $this->log("The remote cache does not exists, creating it."); + } - $cache = $this->saveFolder . "/remote/"; if (!is_writable($cache)) { $this->log("The remote cache is not writable."); } diff --git a/README.md b/README.md index 32f6e20..d2ff94e 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,7 @@ Revision history v0.6.x (latest) +* Create cache directory for remote download if it does not exists. * Cleaned up `img_config.php` and introduced default values for almost all options #72.