Commit 6bc9b2ee authored by mark burdett's avatar mark burdett Committed by Omar Mohamad - El Hassan Lopesino
Browse files

Issue #3261445 by mfb: Unnecessary double-purge if modified file has the same URL

parent 52e04708
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,9 +21,11 @@ function purge_file_file_update(FileInterface $file) {
  if ($file->original instanceof FileInterface
    && ($file->getFileUri() != $file->original->getFileUri() || $file->getSize() != $file->original->getSize())) {
    purge_file_purge($file);
    if ($file->original->createFileUrl(FALSE) != $file->createFileUrl(FALSE)) {
      purge_file_purge($file->original);
    }
  }
}

/**
 * Implements hook_ENTITY_TYPE_delete().