Code Duplication    Length = 5-8 lines in 2 locations

lib/private/Files/View.php 2 locations

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