make fs deletion of directories work

This commit is contained in:
Mario Vavti 2015-04-12 13:58:04 +02:00
parent 7c8b9397ae
commit 962fdf08c0

View File

@ -812,8 +812,8 @@ function attach_delete($channel_id, $resource) {
if($y) {
$f = 'store/' . $channel_address . '/' . $y[0]['data'];
if(is_dir($f))
@rmdir($f);
if(is_dir($y[0]['data']))
@rmdir($y[0]['data']);
elseif(file_exists($f))
unlink($f);
}