Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored and github-actions[bot] committed Apr 30, 2024
1 parent 66f9a61 commit 0d43c95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Controller/Document/PrintpageControllerBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,24 @@ public function cancelGenerationAction(Request $request): JsonResponse

/**
* Checks if a file exists on the filesystem.
*
* @param string $filePath
*
* @return bool
*/
private function checkFileExists(string $filePath): bool
{
$this->invalidateFsCacheFor($filePath);

return file_exists($filePath);
}

/**
* Invalidates the FS cache for a given file path by opening and closing the directory.
* This is a workaround for a bug which happens when the local filesystem is using a NFS with cache.
*
* @param string $filePath
*
* @return void
*/
private function invalidateFsCacheFor(string $filePath): void
Expand Down

0 comments on commit 0d43c95

Please sign in to comment.