Cleanup
[fa-stable.git] / includes / main.inc
index 1f1078d59e2256b39ad3eb06da4566174d221cf4..b89f4496d4cc5ac0699aa3a30b8cc4224d0fccbc 100644 (file)
@@ -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;
 }