diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-03-13 17:18:42 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-03-13 17:18:42 +0000 |
commit | 0f3eebbbd95b75e3dfe8f9322d8fd486925ac54a (patch) | |
tree | 06fe5c0abef1a3df893ec8e97547b32be2dab1c9 /lib | |
parent | 7e3b35a57c53b6e90cb8560d7b4c90e3aba2a3b5 (diff) | |
download | nextcloud-server-0f3eebbbd95b75e3dfe8f9322d8fd486925ac54a.tar.gz nextcloud-server-0f3eebbbd95b75e3dfe8f9322d8fd486925ac54a.zip |
added cleanUp() method to OC_Migrate
Diffstat (limited to 'lib')
-rw-r--r-- | lib/migrate.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/migrate.php b/lib/migrate.php index 88c0e7cfc28..1be229d8fdd 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -438,4 +438,19 @@ class OC_Migrate{ } + /** + * @breif removes migration.db and exportinfo.json from the users data dir + * @return void + */ + static public function cleanUp(){ + if( !self::$uid ){ + OC_Log::write('migration', 'Failed to cleanup after migration', OC_Log::ERROR); + return false; + } + // Remove migration.db + unlink( OC::$SERVERROOT . '/data/' . self::$uid . '/migration.db' ); + // Remove exportinfo.json + unlink( OC::$SERVERROOT . '/data/' . self::$uid . '/exportinfo.json' ); + return true; + } } |