Skip to content

Commit 8f55fda

Browse files
committed
only make the directory if needed
1 parent 9c960a8 commit 8f55fda

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "lkwdwrd/wp-muplugin-loader",
3-
"version" : "1.0.2",
3+
"version" : "1.0.3",
44
"description" : "A drop-in MU Plugin loader for WordPress",
55
"keywords" : ["wordpress", "muplugin", "loader"],
66
"type" : "composer-plugin",

src/lkwdwrd/Composer/MULoaderPlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ public function dumpRequireFile() {
131131
$toLoader = DIRECTORY_SEPARATOR . Util\rel_path( $muPath, $loadFile );
132132

133133
// Write the boostrapping PHP file.
134-
mkdir( $muPath, 0755, true );
134+
if ( !file_exists( $muPath ) ) {
135+
mkdir( $muPath, 0755, true );
136+
}
135137
file_put_contents(
136138
$muPath . 'mu-require.php',
137139
"<?php\nrequire_once __DIR__ . '${toLoader}';\n"

0 commit comments

Comments
 (0)