diff options
| author | wjames5 <will@tekimaki.com> | 2009-12-03 15:22:35 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2009-12-03 15:22:35 +0000 |
| commit | 6d72376c6f941ca1e282205b97e6c381c135d9dc (patch) | |
| tree | 8172f2ead6af5ff4db938c3713c249abb2c34dc2 /admin | |
| parent | 32d8ba87315b09d1399bca3c8a6aa235ba27deca (diff) | |
| download | boards-6d72376c6f941ca1e282205b97e6c381c135d9dc.tar.gz boards-6d72376c6f941ca1e282205b97e6c381c135d9dc.tar.bz2 boards-6d72376c6f941ca1e282205b97e6c381c135d9dc.zip | |
clear boardsync temp dir after sync process otherwise this crap builds up
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/boardsync_inc.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/admin/boardsync_inc.php b/admin/boardsync_inc.php index 6a90367..f78eae2 100644 --- a/admin/boardsync_inc.php +++ b/admin/boardsync_inc.php @@ -78,8 +78,16 @@ function board_sync_run($pLog = FALSE) { } } + // final cleanup imap_expunge( $mbox ); imap_close( $mbox ); + // clear everything we've written to the temp directory + $dir = TEMP_PKG_PATH.BOARDS_PKG_NAME.'/boardsync'; + if( is_dir( $dir ) && strpos( $item['path'], BIT_ROOT_PATH ) === 0 ) { + if( !unlink_r( $dir ) ) { + bit_log_error( "Failed to clear directory: ".$dir." in boards package mailinglist synchronization." ); + } + } } else { bit_log_error( __FILE__." failed imap_open $connectionString ".imap_last_error() ); |
