aboutsummaryrefslogtreecommitdiffstats
path: root/lib/migrate.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-04-01 00:25:47 +0000
committerTom Needham <needham.thomas@gmail.com>2012-04-01 00:25:47 +0000
commiteba6a65908ab848741a29467a2c054818e3c740c (patch)
treedebe939209c4cf030c722ace3036f7cfabdb1e30 /lib/migrate.php
parentffbd72bbcf775ac31a43b958ec1e8eaddf0f8356 (diff)
downloadnextcloud-server-eba6a65908ab848741a29467a2c054818e3c740c.tar.gz
nextcloud-server-eba6a65908ab848741a29467a2c054818e3c740c.zip
try to use transactions to replace db
Diffstat (limited to 'lib/migrate.php')
-rw-r--r--lib/migrate.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/migrate.php b/lib/migrate.php
index db3852fb832..815333b4d89 100644
--- a/lib/migrate.php
+++ b/lib/migrate.php
@@ -257,28 +257,30 @@ class OC_Migrate{
return $appsimported;
break;
case 'instance':
+ /*
// Check for new data dir and dbexport before doing anything
// TODO
- /*
+
// Delete current data folder.
OC_Log::write( 'migration', "Deleting current data dir", OC_Log::INFO );
- if( self::unlink_r( $datadir, false ) ){
+ if( !self::unlink_r( $datadir, false ) ){
OC_Log::write( 'migration', 'Failed to delete the current data dir', OC_Log::ERROR );
return false;
}
// Copy over data
- if( !self::copy_r( $extractname . 'data', $datadir ) ){
+ if( !self::copy_r( $extractpath . 'userdata', $datadir ) ){
OC_Log::write( 'migration', 'Failed to copy over data directory', OC_Log::ERROR );
return false;
}
- */
+
// Import the db
if( !OC_DB::replaceDB( $extractpath . 'dbexport.xml' ) ){
return false;
}
// Done
return true;
+ */
break;
}