Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 authored and github-actions[bot] committed Apr 30, 2024
1 parent a68969a commit 1c27202
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 1c27202

Please sign in to comment.