We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52f396b commit 19cacc7Copy full SHA for 19cacc7
src/AppArena/Models/Cache.php
@@ -42,9 +42,9 @@ public function __construct( $options ) {
42
$dir = $options['dir'];
43
}
44
if ( $dir ) {
45
- if ( ! @mkdir( $dir, 0755, true ) && ! is_dir( $dir ) ) {
46
- throw new \Exception( 'Cannot create cache folder' );
47
- }
+ if (!file_exists($dir) && !@mkdir($dir, 0755, true) && !is_dir($dir)) {
+ throw new \Exception( 'Cannot create cache folder' );
+ }
48
49
if ( ! is_writable( $dir ) ) {
50
throw new \Exception( $dir . ' is not writeable for the webserver.' );
0 commit comments