* If $item is empty then skip to next entry, this fixes the "The first argument cannot be a directory" warnings
* If file does not exist then dont try to copy it
global $is_debug, $dist_dir;
foreach ($list as $item) {
+ if (empty($item)) {
+ continue;
+ } elseif (!is_file($source_dir . DIRECTORY_SEPARATOR . $item)) {
+ echo "WARNING: $item not found\n";
+ continue;
+ }
+
echo "Copying $item from $source_dir to $dest_dir\n";
copy($source_dir . DIRECTORY_SEPARATOR . $item, $dest_dir . DIRECTORY_SEPARATOR . $item);
if ($is_debug) {