From 05479cfa91f26391de1dd7c568bd2c212ade35c0 Mon Sep 17 00:00:00 2001 From: Errol Samuels Date: Fri, 5 Sep 2014 06:34:21 +0000 Subject: [PATCH] fixed for SUN and Solaris where there is a slight variation with copy command. --- resources/classes/install.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/classes/install.php b/resources/classes/install.php index aa806e9ac7..8e7c2cf511 100644 --- a/resources/classes/install.php +++ b/resources/classes/install.php @@ -38,7 +38,12 @@ include "root.php"; //$option '-n' --no-clobber public function recursive_copy($src, $dst, $option = '') { if (file_exists('/bin/cp')) { + // here we are checking if the OS is SUN since the copy command is slightly different + if (strtoupper(substr(PHP_OS, 0, 3)) === 'SUN') { + exec ('cp -Rp '.$src.'/* '.$dst); + } else { //not sun system exec ('cp -RLp '.$option.' '.$src.'/* '.$dst); + } } else { $dir = opendir($src);