Skip to content

Commit 3fe1012

Browse files
CopilotWuSiYu
andcommitted
Fix assets folder creation to use mkdir instead of failing cp
Co-authored-by: WuSiYu <6263652+WuSiYu@users.noreply.github.com>
1 parent 91cf6d1 commit 3fe1012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom.css.plg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ if ($_POST) {
9898
$size = trim(shell_exec("du -sh " . escapeshellarg($assets_target) . "assets | cut -f1"));
9999
$msg = "Assets synced successfully (Flash drive -> Web), size: $size.";
100100
} else {
101-
// Create the assets folder if it doesn't exist
101+
// Create the assets folder in both source and target locations
102102
mkdir($assets_source, 0755, true);
103103
shell_exec("rm -rf " . escapeshellarg($assets_target) . "assets");
104-
shell_exec("cp -r " . escapeshellarg($assets_source) . " " . escapeshellarg($assets_target));
104+
mkdir($assets_target . "assets", 0755, true);
105105
$msg = "Assets folder not found on Flash drive, created an empty one.";
106106
}
107107
}

0 commit comments

Comments
 (0)