diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2009-04-01 09:21:31 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2009-04-01 09:21:31 +0000 |
commit | e45c0bb900c8941f85111b51e4793511b535e6fe (patch) | |
tree | f6bcdf4114248a981986d0e1e711d5320d2d4f16 | |
parent | 03243d7e17702ac4e712d6b77c2a81f7cc2eb9c6 (diff) | |
download | php-git-e45c0bb900c8941f85111b51e4793511b535e6fe.tar.gz |
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
-rw-r--r-- | win32/build/mkdist.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php index bb98e20ed0..11c9b576b3 100644 --- a/win32/build/mkdist.php +++ b/win32/build/mkdist.php @@ -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) { |