From 399bf704460d31671cd3cb1cb353c1ff822dae15 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Mon, 22 Nov 2010 21:08:25 +0000 Subject: [PATCH] Cleanup --- includes/main.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.30.2