From 5fafd55108d1ecd13befaa589902a84a23276af8 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Tue, 11 Jun 2013 12:03:50 +0200 Subject: make sure that only one process can enter the migration mode --- apps/files_encryption/hooks/hooks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/files_encryption/hooks') diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index c4b247da1ed..9f36393d591 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -67,10 +67,10 @@ class Hooks { $session->setPrivateKey($privateKey, $params['uid']); // Check if first-run file migration has already been performed - $migrationCompleted = $util->getMigrationStatus(); + $ready = $util->beginMigration(); // If migration not yet done - if (!$migrationCompleted) { + if ($ready) { $userView = new \OC_FilesystemView('/' . $params['uid']); @@ -102,7 +102,7 @@ class Hooks { } // Register successful migration in DB - $util->setMigrationStatus(1); + $util->finishMigration(); } -- cgit v1.2.3