Code Duplication    Length = 5-5 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 1229-1233 (lines=5) @@
1226
					}
1227
				}
1228
1229
				if (!$unlockLater
1230
					&& (\in_array('write', $hooks) || \in_array('delete', $hooks) || \in_array('read', $hooks))
1231
				) {
1232
					$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1233
				}
1234
				return $result;
1235
			} else {
1236
				$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
@@ 1187-1191 (lines=5) @@
1184
						$result = $storage->$operation($internalPath);
1185
					}
1186
				} catch (\Exception $e) {
1187
					if (\in_array('write', $hooks) || \in_array('delete', $hooks)) {
1188
						$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
1189
					} elseif (\in_array('read', $hooks)) {
1190
						$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1191
					}
1192
					throw $e;
1193
				}
1194