]> granicus.if.org Git - php/commitdiff
MFH:
authorKalle Sommer Nielsen <kalle@php.net>
Wed, 1 Apr 2009 09:21:31 +0000 (09:21 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Wed, 1 Apr 2009 09:21:31 +0000 (09:21 +0000)
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

win32/build/mkdist.php

index bb98e20ed09f05a7e5efcceaadfb4c1ef4f36734..11c9b576b3cd46f82398520f43b633ed9a816836 100644 (file)
@@ -112,6 +112,13 @@ function copy_file_list($source_dir, $dest_dir, $list)
        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) {