Remove db tmp file after export creation

remotes/origin/stable4
Tom Needham 13 years ago
parent 3e84d85482
commit ce89ff15aa
  1. 11
      lib/migration/content.php

@ -28,7 +28,7 @@ class OC_Migration_Content{
private $zip=false; private $zip=false;
// Holds the MDB2 object // Holds the MDB2 object
private $db=false; private $db=null;
// Holds an array of tmpfiles to delete after zip creation // Holds an array of tmpfiles to delete after zip creation
private $tmpfiles=false; private $tmpfiles=false;
@ -38,11 +38,18 @@ class OC_Migration_Content{
* @param optional $db a MDB2 database object (required for exporttype user) * @param optional $db a MDB2 database object (required for exporttype user)
* @return bool * @return bool
*/ */
public function __construct( $zip, $db=false ){ public function __construct( $zip, $db=null ){
$this->zip = $zip; $this->zip = $zip;
$this->db = $db; $this->db = $db;
if( !is_null( $db ) ){
// Get db path
$db = $this->db->getDatabase();
$this->tmpfiles[] = $db;
OC_Log::write('user-migrate',$db, OC_Log::INFO);
}
} }
// @breif prepares the db // @breif prepares the db

Loading…
Cancel
Save