Skip to content

Commit 99440e2

Browse files
committed
Preventive hotfix for #614
1 parent 601e2d2 commit 99440e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected function getFilePath($keyword, $skip = false): string
163163
* Skip Create Sub Folders;
164164
*/
165165
if (!$skip && !\is_dir($path) && @!\mkdir($path, $this->getDefaultChmod(), true) && !\is_dir($path)) {
166-
throw new PhpfastcacheIOException('PLEASE CHMOD ' . $path . ' - ' . $this->getDefaultChmod() . ' OR ANY WRITABLE PERMISSION!');
166+
throw new PhpfastcacheIOException('Path "' . $path . '" is not writable, please set a chmod 0777 or any writable permission and make sure to make use of an absolute path !');
167167
}
168168

169169
return $path . '/' . $filename . '.' . $this->getConfig()->getCacheFileExtension();

lib/Phpfastcache/Drivers/Files/Driver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ protected function driverDelete(CacheItemInterface $item): bool
127127
if ($item instanceof Item) {
128128
$file_path = $this->getFilePath($item->getKey(), true);
129129
if (\file_exists($file_path) && @\unlink($file_path)) {
130+
\clearstatcache(true, $file_path);
130131
$dir = \dirname($file_path);
131132
if (!(new \FilesystemIterator($dir))->valid()) {
132133
\rmdir($dir);

0 commit comments

Comments
 (0)