Code Duplication    Length = 5-8 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 742-749 (lines=8) @@
739
				$result = $this->basicOperation('unlink', $path, ['delete']);
740
			}
741
742
			if (!$result && !$this->file_exists($path)) { //clear ghost files from the cache on delete
743
				$storage = $mount->getStorage();
744
				$internalPath = $mount->getInternalPath($absolutePath);
745
				$storage->getUpdater()->remove($internalPath);
746
				return true;
747
			} else {
748
				return $result;
749
			}
750
		}, ['before' => ['path' => $this->getAbsolutePath($path)], 'after' => ['path' => $this->getAbsolutePath($path)]], 'file', 'delete');
751
	}
752
@@ 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');