diff --git a/controllers/class.ClearCache.php b/controllers/class.ClearCache.php index 116079dfd..b91f51791 100644 --- a/controllers/class.ClearCache.php +++ b/controllers/class.ClearCache.php @@ -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)) {