Bug fix in mod installation

This commit is contained in:
Pentium44 2021-02-16 23:08:00 -08:00
parent d021f77637
commit 944e0b8807

View File

@ -342,7 +342,7 @@ else if(isset($_GET['do']))
chdir("mods");
foreach(glob("*") as $modname) {
// server_announce = true
if(isset($_POST[$modname])) {
if(isset($_POST[$modname]) && !is_dir("mtm_db/worlds/$userid/worlds/world/worldmods/" . $_POST[$modname] . "/")) {
echo "Copying $modname...";
chdir("..");
file_put_contents("mtm_db/events/$userid", "cp -a mods/$modname mtm_db/worlds/$userid/worlds/world/worldmods/$modname");