Code Duplication    Length = 6-6 lines in 2 locations

lib/private/files/storage/dav.php 2 locations

@@ 364-369 (lines=6) @@
361
362
				curl_exec($curl);
363
				$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
364
				if ($statusCode !== 200) {
365
					Util::writeLog("webdav client", 'curl GET ' . curl_getinfo($curl, CURLINFO_EFFECTIVE_URL) . ' returned status code ' . $statusCode, Util::ERROR);
366
					if ($statusCode === 423) {
367
						throw new \OCP\Lock\LockedException($path);
368
					}
369
				}
370
				curl_close($curl);
371
				rewind($fp);
372
				return $fp;
@@ 513-518 (lines=6) @@
510
		}
511
		curl_exec($curl);
512
		$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
513
		if ($statusCode !== 200) {
514
			Util::writeLog("webdav client", 'curl GET ' . curl_getinfo($curl, CURLINFO_EFFECTIVE_URL) . ' returned status code ' . $statusCode, Util::ERROR);
515
			if ($statusCode === 423) {
516
				throw new \OCP\Lock\LockedException($path);
517
			}
518
		}
519
		curl_close($curl);
520
		fclose($source);
521
		$this->removeCachedFile($target);