From d0abe50a19540779b1ae3c8d147d005c0a860c30 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 5 Sep 2014 06:53:46 +0000 Subject: [PATCH] Fix the indentation and improve the comments --- resources/classes/install.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/classes/install.php b/resources/classes/install.php index 8e7c2cf511..e2e4a305a7 100644 --- a/resources/classes/install.php +++ b/resources/classes/install.php @@ -38,11 +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); + //copy -R recursive, preserve attributes for SUN + exec ('cp -Rp '.$src.'/* '.$dst); + } else { + //copy -R recursive, -L follow symbolic links, -p preserve attributes for other Posix systemss + exec ('cp -RLp '.$option.' '.$src.'/* '.$dst); } } else {