|
|
@ -238,13 +238,13 @@ class OC_Migrate{ |
|
|
|
$userfolder = $extractpath . $json->exporteduser; |
|
|
|
$userfolder = $extractpath . $json->exporteduser; |
|
|
|
$newuserfolder = $datadir . '/' . self::$uid; |
|
|
|
$newuserfolder = $datadir . '/' . self::$uid; |
|
|
|
foreach(scandir($userfolder) as $file){ |
|
|
|
foreach(scandir($userfolder) as $file){ |
|
|
|
if($file !== '.' && $file !== '..' && is_dir($file)){ |
|
|
|
if($file !== '.' && $file !== '..' && is_dir($file)) { |
|
|
|
// Then copy the folder over |
|
|
|
// Then copy the folder over |
|
|
|
OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file); |
|
|
|
OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Import user app data |
|
|
|
// Import user app data |
|
|
|
if(file_exists($extractpath . $json->exporteduser . '/migration.db')){ |
|
|
|
if(file_exists($extractpath . $json->exporteduser . '/migration.db')) { |
|
|
|
if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', $json, self::$uid ) ) { |
|
|
|
if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', $json, self::$uid ) ) { |
|
|
|
return json_encode( array( 'success' => false ) ); |
|
|
|
return json_encode( array( 'success' => false ) ); |
|
|
|
} |
|
|
|
} |
|
|
|