1
0
Fork 0

Add more debug output when writing to cache

pull/4599/head
Jordi Boggiano 2015-11-10 13:12:47 +00:00
parent 6f21bd425a
commit fc0da27d84
1 changed files with 4 additions and 2 deletions

View File

@ -124,8 +124,10 @@ class Cache
$file = preg_replace('{[^'.$this->whitelist.']}i', '-', $file);
$this->filesystem->ensureDirectoryExists(dirname($this->root . $file));
if ($this->io->isDebug()) {
$this->io->writeError('Writing '.$this->root . $file.' into cache');
if (!file_exists($source)) {
$this->io->writeError('<error>'.$source.' does not exist, can not write into cache</error>');
} elseif ($this->io->isDebug()) {
$this->io->writeError('Writing '.$this->root . $file.' into cache from '.$source);
}
return copy($source, $this->root . $file);