mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
use unlink() to delete js files in cache, because rm can fail for a large number of files
This commit is contained in:
parent
fdf91ac3a2
commit
5d083993df
|
@ -45,8 +45,8 @@ class SeedDMS_Controller_ClearCache extends SeedDMS_Controller_Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($post['js'])) {
|
if(!empty($post['js'])) {
|
||||||
$cmd = 'rm -rf '.addDirSep($settings->_cacheDir).'js'.DIRECTORY_SEPARATOR.'*';
|
/* system('rm ...') does not work anymore if the number of files is too large */
|
||||||
system($cmd, $ret);
|
array_map('unlink', array_filter((array) glob(addDirSep($settings->_cacheDir).'js'.DIRECTORY_SEPARATOR.'*')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(false === $this->callHook('clear', $post)) {
|
if(false === $this->callHook('clear', $post)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user