From: Janusz Dobrowolski Date: Mon, 22 Nov 2010 21:08:25 +0000 (+0000) Subject: Cleanup X-Git-Tag: v2.4.2~19^2~467 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=399bf704460d31671cd3cb1cb353c1ff822dae15;p=fa-stable.git Cleanup --- diff --git a/includes/main.inc b/includes/main.inc index 1f1078d5..b89f4496 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -270,11 +270,12 @@ function check_write($path) function copy_files($flist, $from, $to, $strict=false) { foreach ($flist as $file) { - if (file_exists($from.'/'.$file)) + if (file_exists($from.'/'.$file)) { if (!copy_file($file, $from, $to)) return false; - if ($strict && !is_file($from.'/'.$file)) // if + } else if ($strict) { unlink($to.'/'.$file); + } } return true; }