Code Duplication    Length = 8-9 lines in 2 locations

apps/encryption/lib/Crypto/EncryptAll.php 1 location

@@ 274-281 (lines=8) @@
271
				if ($this->rootView->is_dir($path)) {
272
					$directories[] = $path;
273
					continue;
274
				} else {
275
					$progress->setMessage("encrypt files for user $userCount: $path");
276
					$progress->advance();
277
					if($this->encryptFile($path) === false) {
278
						$progress->setMessage("encrypt files for user $userCount: $path (already encrypted)");
279
						$progress->advance();
280
					}
281
				}
282
			}
283
		}
284
	}

lib/private/Encryption/DecryptAll.php 1 location

@@ 225-233 (lines=9) @@
222
					try {
223
						$progress->setMessage("decrypt files for user $userCount: $path");
224
						$progress->advance();
225
						if ($file->isEncrypted() === false) {
226
							$progress->setMessage("decrypt files for user $userCount: $path (already decrypted)");
227
							$progress->advance();
228
						} else {
229
							if ($this->decryptFile($path) === false) {
230
								$progress->setMessage("decrypt files for user $userCount: $path (already decrypted)");
231
								$progress->advance();
232
							}
233
						}
234
					} catch (\Exception $e) {
235
						if (isset($this->failed[$uid])) {
236
							$this->failed[$uid][] = $path;