Permalink
Browse files

BUGFIX: removing files that are invalid.

  • Loading branch information...
1 parent a61e501 commit 649fa6bd8cfd091281e9ce475b37be5f35673edf Julian Seidenberg committed Feb 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/CachedGitArchiver.php
@@ -292,7 +292,6 @@ function createFile($overwrite = false) {
if (!file_exists($CLI_outputFile)) $retVal = 100;
elseif (filesize($CLI_outputFile) <= 512) {
$retVal = 100;
- unlink($CLI_outputFile);
}
}
@@ -305,6 +304,7 @@ function createFile($overwrite = false) {
return true;
} else {
+ exec("rm $CLI_outputFile"); //delete the failed file (tried unlink here, but it didn't work)
$cache = DataObject::get_by_id("GitInfoCache", $infoID);
$cache->FailedAttempts = $cache->FailedAttempts + 1;
$cache->write();

0 comments on commit 649fa6b

Please sign in to comment.