Code Duplication    Length = 5-8 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 364-368 (lines=5) @@
361
				$result = false;
362
			}
363
364
			if (!$result && !$this->file_exists($path)) { //clear ghost files from the cache on delete
365
				$storage = $mount->getStorage();
366
				$internalPath = $mount->getInternalPath($absolutePath);
367
				$storage->getUpdater()->remove($internalPath);
368
			}
369
370
			return $result;
371
		}, ['before' => ['path' => $this->getAbsolutePath($path)], 'after' => ['path' => $this->getAbsolutePath($path)]], 'file', 'delete');
@@ 751-758 (lines=8) @@
748
				$result = $this->basicOperation('unlink', $path, ['delete']);
749
			}
750
751
			if (!$result && !$this->file_exists($path)) { //clear ghost files from the cache on delete
752
				$storage = $mount->getStorage();
753
				$internalPath = $mount->getInternalPath($absolutePath);
754
				$storage->getUpdater()->remove($internalPath);
755
				return true;
756
			} else {
757
				return $result;
758
			}
759
		}, ['before' => ['path' => $this->getAbsolutePath($path)], 'after' => ['path' => $this->getAbsolutePath($path)]], 'file', 'delete');
760
	}
761