Code Duplication    Length = 7-7 lines in 2 locations

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

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