Code Duplication    Length = 7-7 lines in 2 locations

apps/files_external/lib/Lib/Storage/SMB.php 2 locations

@@ 238-244 (lines=7) @@
235
		try {
236
			$result = $this->share->rename($absoluteSource, $absoluteTarget);
237
		} catch (AlreadyExistsException $e) {
238
			if ($retry) {
239
				$this->remove($target);
240
				$result = $this->share->rename($absoluteSource, $absoluteTarget, false);
241
			} else {
242
				$this->logger->logException($e, ['level' => ILogger::WARN]);
243
				return false;
244
			}
245
		} catch (InvalidArgumentException $e) {
246
			if ($retry) {
247
				$this->remove($target);
@@ 246-252 (lines=7) @@
243
				return false;
244
			}
245
		} catch (InvalidArgumentException $e) {
246
			if ($retry) {
247
				$this->remove($target);
248
				$result = $this->share->rename($absoluteSource, $absoluteTarget, false);
249
			} else {
250
				$this->logger->logException($e, ['level' => ILogger::WARN]);
251
				return false;
252
			}
253
		} catch (\Exception $e) {
254
			$this->logger->logException($e, ['level' => ILogger::WARN]);
255
			return false;