diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-03-31 23:20:08 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-03-31 23:20:08 +0000 |
commit | ce89ff15aaa971ec930196db64e7437c2fe47fa5 (patch) | |
tree | ab1f082410d6ce9dfc0c473e10c1916a88441035 /lib/migration | |
parent | 3e84d8548296152112c09aa0e4a3a4c02b816494 (diff) | |
download | nextcloud-server-ce89ff15aaa971ec930196db64e7437c2fe47fa5.tar.gz nextcloud-server-ce89ff15aaa971ec930196db64e7437c2fe47fa5.zip |
Remove db tmp file after export creation
Diffstat (limited to 'lib/migration')
-rw-r--r-- | lib/migration/content.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/migration/content.php b/lib/migration/content.php index d25b5af293c..a9fa05596b3 100644 --- a/lib/migration/content.php +++ b/lib/migration/content.php @@ -28,7 +28,7 @@ class OC_Migration_Content{ private $zip=false; // Holds the MDB2 object - private $db=false; + private $db=null; // Holds an array of tmpfiles to delete after zip creation private $tmpfiles=false; @@ -38,11 +38,18 @@ class OC_Migration_Content{ * @param optional $db a MDB2 database object (required for exporttype user) * @return bool */ - public function __construct( $zip, $db=false ){ + public function __construct( $zip, $db=null ){ $this->zip = $zip; $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 |