[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-doc
Subject: [PHP-GTK-DOC]cvs: php-gtk-doc/scripts/copy_images.php
From: mikespook <mikespook () gmail ! com>
Date: 2006-12-06 15:11:30
Message-ID: cb2a8cc90612060711r1832a0bar772487d75c1ec28b () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
Modified files:
php-gtk-doc/scripts/copy_images.php
Log:
If the path $fulldest alreay existed, there would be a warning executing
mkdir in copy_images.php line 22. Add file_exists check if the path already
existed. Because I havent got the cvs account yet, I send this to the list.
Index: copy_images.php
===================================================================
RCS file: /repository/php-gtk-doc/scripts/copy_images.php,v
retrieving revision 1.1
diff -u -r1.1 copy_images.php
--- copy_images.php 26 Mar 2006 02:44:13 -0000 1.1
+++ copy_images.php 6 Dec 2006 14:52:38 -0000
@@ -19,7 +19,9 @@
if ($file != "." && $file != ".." && $file != "CVS") {
$fulldest = $dest.substr(getcwd(), strpos(getcwd(),
'images')-1)."/$file";
if (is_dir($file)) {
- mkdir($fulldest, 0777);
+ if (!file_exists($fulldest)) {
+ mkdir($fulldest, 0777);
+ }
copy_images(realpath($file), $dest, $count);
} else {
copy($file, $fulldest);
--
广州市一方信息咨询有限公司
地址:广州市 江南大道中 穗花村 三巷12号204
邮编:510245
电话:020-39738561 020-39738571
传真:020-84476279
网站:www.i-fang.com
邮件:market@i-fang.com
[Attachment #5 (text/html)]
<div>Modified files:<br clear="all"> php-gtk-doc/scripts/copy_images.php</div>
<div>Log:</div>
<div> If the path $fulldest alreay existed, there would be a warning executing \
mkdir in copy_images.php line 22. Add file_exists check if the path already existed. \
Because I havent got the cvs account yet, I send this to the list. </div>
<div> </div>
<div>Index: copy_images.php<br>===================================================================<br>RCS \
file: /repository/php-gtk-doc/scripts/copy_images.php,v<br>retrieving revision \
1.1<br>diff -u -r1.1 copy_images.php <br>--- copy_images.php 26 Mar 2006 \
02:44:13 -0000 1.1<br>+++ copy_images.php 6 Dec 2006 14:52:38 -0000<br>@@ \
-19,7 +19,9 @@<br> \
if ($file != "." && $file != ".." && $file != \
"CVS") { <br> \
$fulldest = $dest.substr(getcwd(), strpos(getcwd(), \
'images')-1)."/$file";<br> \
if (is_dir($file)) {<br>- \
mkdir($fulldest, 0777);<br>+ \
if (!file_exists($fulldest)) { \
<br>+ &nb \
sp; \
mkdir($fulldest, 0777);<br>+ \
}<br> \
copy_images(realpath($file), $dest, \
$count);<br> \
} else {<br> \
copy($file, $fulldest); </div>
<div><br>-- <br>广州市一方信息咨询有限公司<br>地址:广州市 江南大道中 穗花村 \
三巷12号204<br>邮编:510245 <br>电话:020-39738561 \
020-39738571<br>传真:020-84476279<br>网站:<a \
href="http://www.i-fang.com">www.i-fang.com</a><br>邮件:<a \
href="mailto:market@i-fang.com"> market@i-fang.com</a> </div>
["copy_images.php.patch" (text/plain)]
Index: copy_images.php
===================================================================
RCS file: /repository/php-gtk-doc/scripts/copy_images.php,v
retrieving revision 1.1
diff -u -r1.1 copy_images.php
--- copy_images.php 26 Mar 2006 02:44:13 -0000 1.1
+++ copy_images.php 6 Dec 2006 14:52:38 -0000
@@ -19,7 +19,9 @@
if ($file != "." && $file != ".." && $file != "CVS") {
$fulldest = $dest.substr(getcwd(), strpos(getcwd(), 'images')-1)."/$file";
if (is_dir($file)) {
- mkdir($fulldest, 0777);
+ if (!file_exists($fulldest)) {
+ mkdir($fulldest, 0777);
+ }
copy_images(realpath($file), $dest, $count);
} else {
copy($file, $fulldest);
--
PHP-GTK Documentation Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic