diff options
Diffstat (limited to 'admin/boardsync_inc.php')
| -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() ); |
