aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks/hooks.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-10 14:03:06 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-10 14:03:06 +0100
commite6df86f4cb4b28c07804cb5748cf3d0679e58b25 (patch)
treec48fbfa525e6f914a38753c34ab9eeac55782c69 /apps/files_encryption/hooks/hooks.php
parent8ad3fc89bed6b52b0f40095834b3b61b36d7c71c (diff)
parent02bdb470498fb8b71f1bc582af2f55795a719c39 (diff)
downloadnextcloud-server-e6df86f4cb4b28c07804cb5748cf3d0679e58b25.tar.gz
nextcloud-server-e6df86f4cb4b28c07804cb5748cf3d0679e58b25.zip
Merge branch 'master' into quota-space-root
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r--apps/files_encryption/hooks/hooks.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 4c4b3f2040f..83abf3ba9de 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -80,8 +80,15 @@ class Hooks {
// Check if first-run file migration has already been performed
$ready = false;
- if ($util->getMigrationStatus() === Util::MIGRATION_OPEN) {
+ $migrationStatus = $util->getMigrationStatus();
+ if ($migrationStatus === Util::MIGRATION_OPEN) {
$ready = $util->beginMigration();
+ } elseif ($migrationStatus === Util::MIGRATION_IN_PROGRESS) {
+ // refuse login as long as the initial encryption is running
+ while ($migrationStatus === Util::MIGRATION_IN_PROGRESS) {
+ sleep(60);
+ $migrationStatus = $util->getMigrationStatus();
+ }
}
// If migration not yet done