From d588d60cb79e810bab20f218f75b2cebc985b523 Mon Sep 17 00:00:00 2001 From: Conrad Vermeulen Date: Tue, 12 Aug 2008 10:45:08 +0000 Subject: [PATCH] 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. --- search2/bin/cronCleanup.php | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/search2/bin/cronCleanup.php b/search2/bin/cronCleanup.php index e21ea2a..d72c449 100644 --- a/search2/bin/cronCleanup.php +++ b/search2/bin/cronCleanup.php @@ -49,6 +49,8 @@ function cleanupTempDirectory($dir, $force = false) { $dir = str_replace('\\','/', $dir); + if (strpos($dir, '/tmp') === false) return; + $dh = opendir($dir); while (($name = readdir($dh)) !== false) { -- libgit2 0.21.4