1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-07-25 18:51:19 +02:00

create caache directory for remote download if it does not exists #43

This commit is contained in:
Mikael Roos
2015-01-14 21:00:08 +01:00
parent 81e70b7acd
commit c35587c7e2
2 changed files with 7 additions and 1 deletions

View File

@@ -473,8 +473,13 @@ class CImage
public function downloadRemoteSource($src) public function downloadRemoteSource($src)
{ {
$remote = new CRemoteImage(); $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)) { if (!is_writable($cache)) {
$this->log("The remote cache is not writable."); $this->log("The remote cache is not writable.");
} }

View File

@@ -280,6 +280,7 @@ Revision history
v0.6.x (latest) 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. * Cleaned up `img_config.php` and introduced default values for almost all options #72.