Code Duplication    Length = 5-5 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 1172-1176 (lines=5) @@
1169
						$result = $storage->$operation($internalPath);
1170
					}
1171
				} catch (\Exception $e) {
1172
					if (\in_array('write', $hooks) || \in_array('delete', $hooks)) {
1173
						$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
1174
					} elseif (\in_array('read', $hooks)) {
1175
						$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1176
					}
1177
					throw $e;
1178
				}
1179
@@ 1214-1218 (lines=5) @@
1211
					}
1212
				}
1213
1214
				if (!$unlockLater
1215
					&& (\in_array('write', $hooks) || \in_array('delete', $hooks) || \in_array('read', $hooks))
1216
				) {
1217
					$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
1218
				}
1219
				return $result;
1220
			} else {
1221
				$this->unlockFile($path, ILockingProvider::LOCK_SHARED);