cvs: php-master-web /scripts update-backend
| From: | jim winstead | Date: | Thu, 13 Dec 2001 19:19:02 +0000 |
| Subject: | cvs: php-master-web /scripts update-backend | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-7825@lists.php.net to get a copy of this message | ||
jimw Thu Dec 13 14:19:02 2001 EDT
Modified files:
/php-master-web/scripts update-backend
Log:
fix error messages, don't try to rename file after deleting it
Index: php-master-web/scripts/update-backend
diff -u php-master-web/scripts/update-backend:1.4 php-master-web/scripts/update-backend:1.5
--- php-master-web/scripts/update-backend:1.4 Sun Sep 30 22:46:04 2001
+++ php-master-web/scripts/update-backend Thu Dec 13 14:19:02 2001
@@ -25,7 +25,7 @@
$dest = @fopen("$file~","w");
if (!$dest) {
- echo "failed to open '$dest~' for writing\n";
+ echo "failed to open '$file~' for writing\n";
return;
}
@@ -34,15 +34,16 @@
if (fwrite($dest,$chunk) < 0) {
fclose($source); fclose($dest);
unlink("$file~");
- echo "failed writing to '$dest~'\n";
+ echo "failed writing to '$file~'\n";
return;
}
}
fclose($source); fclose($dest);
if (!@filesize("$file~")) {
- echo "'$dest~' was empty, skipping\n";
+ echo "'$file~' was empty, skipping\n";
unlink("$file~");
+ return;
}
return rename("$file~",$file);