AvalancheImagineBundle
AvalancheImagineBundle copied to clipboard
Check if path is a file (not a directory)
Hello,
Since the CachePathResolver is unlinking file, is it possible to check first that the $cached is a file, not a directory, to avoid error on trying to unlink a directory ? add a
!is_dir($cached)on
getBrowserPath()
public function getBrowserPath($path, $filter, $absolute = false) {
...
if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached) ) ...
@EricGrivilers I think it would be good as I have errors in this exact case! make a PR?
@dupuchba PR done.
@EricGrivilers good :), now we need @avalanche123 to merge it :D