Skip to content

Commit e45c0bb

Browse files
committed
MFH:
Fixed a few warnings from copy(): * 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
1 parent 03243d7 commit e45c0bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

win32/build/mkdist.php

+7
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ function copy_file_list($source_dir, $dest_dir, $list)
112112
global $is_debug, $dist_dir;
113113

114114
foreach ($list as $item) {
115+
if (empty($item)) {
116+
continue;
117+
} elseif (!is_file($source_dir . DIRECTORY_SEPARATOR . $item)) {
118+
echo "WARNING: $item not found\n";
119+
continue;
120+
}
121+
115122
echo "Copying $item from $source_dir to $dest_dir\n";
116123
copy($source_dir . DIRECTORY_SEPARATOR . $item, $dest_dir . DIRECTORY_SEPARATOR . $item);
117124
if ($is_debug) {

0 commit comments

Comments
 (0)