diff --git a/core/util.inc.php b/core/util.inc.php index 03259b20..8803ecf9 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -612,7 +612,13 @@ function ip_in_range($IP, $CIDR) { */ function deltree($f) { if (is_link($f)) { - unlink($f); + //Because Windows (I know, bad excuse) + if (PHP_OS === 'WINNT') { + rmdir($f); + } + else { + unlink($f); + } } else if(is_dir($f)) { foreach(glob($f.'/*') as $sf) { diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index e4f83ad0..b1763f2a 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -177,7 +177,14 @@ class ExtManager extends SimpleExtension { // yes, even though we are in /, and thus the path to contrib is // ./contrib, the link needs to be ../ because it is literal data // which will be interpreted relative to ./ext/ by the OS - symlink("../contrib/$fname", "ext/$fname"); + + //Because Windows (I know, bad excuse) + if (PHP_OS === 'WINNT') { + symlink(realpath("./contrib/$fname"), realpath("./ext/").'/'.$fname); + } + else { + symlink("../contrib/$fname", "ext/$fname"); + } } else { full_copy("contrib/$fname", "ext/$fname");