Commit d588d60cb79e810bab20f218f75b2cebc985b523
1 parent
7b45c629
KTS-3598
"KnowledgeTree's temp folder has too many smarty files in it. over time, the directory gets very large." Implemented. Added a 'safety' to ensure we are in a tmp directory when cleaning up. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9104 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
0 deletions
search2/bin/cronCleanup.php
| @@ -49,6 +49,8 @@ function cleanupTempDirectory($dir, $force = false) | @@ -49,6 +49,8 @@ function cleanupTempDirectory($dir, $force = false) | ||
| 49 | { | 49 | { |
| 50 | $dir = str_replace('\\','/', $dir); | 50 | $dir = str_replace('\\','/', $dir); |
| 51 | 51 | ||
| 52 | + if (strpos($dir, '/tmp') === false) return; | ||
| 53 | + | ||
| 52 | $dh = opendir($dir); | 54 | $dh = opendir($dir); |
| 53 | while (($name = readdir($dh)) !== false) | 55 | while (($name = readdir($dh)) !== false) |
| 54 | { | 56 | { |