summaryrefslogtreecommitdiffstats
path: root/apps/user_migrate
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-03-13 17:08:20 +0000
committerTom Needham <needham.thomas@gmail.com>2012-03-13 17:08:20 +0000
commit7e3b35a57c53b6e90cb8560d7b4c90e3aba2a3b5 (patch)
tree43803adee74b03473e999d72194b2c3193de4ef8 /apps/user_migrate
parent111af7fed5a03d45793536c23ecc5c25bfc1d36f (diff)
downloadnextcloud-server-7e3b35a57c53b6e90cb8560d7b4c90e3aba2a3b5.tar.gz
nextcloud-server-7e3b35a57c53b6e90cb8560d7b4c90e3aba2a3b5.zip
fix structure of user export zip
Diffstat (limited to 'apps/user_migrate')
-rw-r--r--apps/user_migrate/settings.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/user_migrate/settings.php b/apps/user_migrate/settings.php
index edad7357a2a..00f46660cf5 100644
--- a/apps/user_migrate/settings.php
+++ b/apps/user_migrate/settings.php
@@ -53,15 +53,11 @@ if (isset($_POST['user_export'])) {
// Migrate the app info
$info = json_encode( OC_Migrate::export( $user ) );
- $infofile = $exportdir . '/exportinfo.json';
- if( !file_put_contents( $infofile, $info ) ){
- die('Failed to save the export info');
- }
- $zip->addFile( $infofile, "exportinfo.json");
- $zip->addFile(OC::$SERVERROOT . '/data/' . $user . '/migration.db', "migration.db");
+ $infofile = OC::$SERVERROOT . '/data/' . $user . '/exportinfo.json';
+ file_put_contents( $infofile, $info );
- // Add the data dir
- zipAddDir(OC::$SERVERROOT . "/data/" . $user, $zip, true, "files/");
+ // Add the data dir (which includes migration.db and exportinfo.json)
+ zipAddDir(OC::$SERVERROOT . "/data/" . $user, $zip, true, "/");
// Save the zip
$zip->close();