Code Duplication    Length = 5-5 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 1205-1209 (lines=5) @@
1202
					}
1203
				}
1204
1205
				if (!$unlockLater
1206
					&& (\in_array('write', $hooks) || \in_array('delete', $hooks) || \in_array('read', $hooks))
1207
				) {
1208
					$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1209
				}
1210
				return $result;
1211
			} else {
1212
				$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
@@ 1163-1167 (lines=5) @@
1160
						$result = $storage->$operation($internalPath);
1161
					}
1162
				} catch (\Exception $e) {
1163
					if (\in_array('write', $hooks) || \in_array('delete', $hooks)) {
1164
						$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
1165
					} elseif (\in_array('read', $hooks)) {
1166
						$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1167
					}
1168
					throw $e;
1169
				}
1170