mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +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'])) {
|
||||
$cmd = 'rm -rf '.addDirSep($settings->_cacheDir).'js'.DIRECTORY_SEPARATOR.'*';
|
||||
system($cmd, $ret);
|
||||
/* system('rm ...') does not work anymore if the number of files is too large */
|
||||
array_map('unlink', array_filter((array) glob(addDirSep($settings->_cacheDir).'js'.DIRECTORY_SEPARATOR.'*')));
|
||||
}
|
||||
|
||||
if(false === $this->callHook('clear', $post)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user