From 4343e0592e7d86126cf7317289f757ce6cb4871e Mon Sep 17 00:00:00 2001 From: haneul Date: Sat, 6 Feb 2010 16:01:33 +0000 Subject: [PATCH] #18681100 : do not chmod for windows server git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7289 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/autoinstall/autoinstall.lib.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/modules/autoinstall/autoinstall.lib.php b/modules/autoinstall/autoinstall.lib.php index 84c0e6eaa..44a8f9944 100644 --- a/modules/autoinstall/autoinstall.lib.php +++ b/modules/autoinstall/autoinstall.lib.php @@ -205,17 +205,21 @@ { return new Object(-1, "msg_make_directory_failed"); } - if (function_exists('ftp_chmod')) { - if(!ftp_chmod($connection, 0755, $ftp_path)) - { - return new Object(-1, "msg_permission_adjust_failed"); - } - } - else + + if(!stristr(PHP_OS, 'win')) { - if(!ftp_site($connection, "CHMOD 755 ".$ftp_path)) + if (function_exists('ftp_chmod')) { + if(!ftp_chmod($connection, 0755, $ftp_path)) + { + return new Object(-1, "msg_permission_adjust_failed"); + } + } + else { - return new Object(-1, "msg_permission_adjust_failed"); + if(!ftp_site($connection, "CHMOD 755 ".$ftp_path)) + { + return new Object(-1, "msg_permission_adjust_failed"); + } } } }