1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-07-25 02:31:20 +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)
{
$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.");
}