Skip to content

Commit

Permalink
WebTestOfUpgradeDatabase: Don't redownload the zip file more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Jun 9, 2011
1 parent a88e339 commit 9cc0f32
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/WebTestOfUpgradeDatabase.php
Expand Up @@ -383,8 +383,7 @@ private function getInstall($url, $version, $path) {
$ch = curl_init();
$zipfile = $path . '/' . $version . '.zip';

// if zip file is not there or is older than 8 hours old
if(! file_exists($zipfile) || ( time() - filemtime($zipfile) > (60 * 60 * 24 * 7) ) ) {
if(! file_exists($zipfile) ) {
if( file_exists($zipfile) ) {
$this->debug("zip file for $version is old, refreshing");
unlink($zipfile);
Expand Down

0 comments on commit 9cc0f32

Please sign in to comment.