[VD:FlysystemGoogleDriveNetmount] remove tmb on netunmount

This commit is contained in:
nao-pon
2016-03-25 20:19:31 +09:00
parent 80ac56b0b2
commit 34feaad34f
@@ -238,6 +238,11 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends \Barryvdh\elFinderFlysy
if (file_exists($cache) && is_writeable($cache)) {
unlink($cache);
}
if ($tmbs = glob($this->tmbPath . DIRECTORY_SEPARATOR . $this->netMountKey . '*')) {
foreach($tmbs as $file) {
unlink($file);
}
}
return true;
}
@@ -326,4 +331,12 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends \Barryvdh\elFinderFlysy
list($url) = explode('?', $url);
return $url;
}
/**
* @inheritdoc
*/
protected function tmbname($stat) {
return $this->netMountKey.substr(substr($stat['hash'], strlen($this->id)), -38).$stat['ts'].'.png';
}
}