Skip to content

Commit

Permalink
added check if resource was found in dowload-view
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 14, 2011
1 parent 658bf81 commit 24fefca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dl.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ function removeDirectory($dir) {
}
$logEntry = ($history) ? $history->entries[0] : null;

if (!$logEntry) {
header('HTTP/1.x 404 Not Found', true, 404);
error_log('Unable to download resource at path: '.$path);
print 'Unable to download resource at path: '.xml_entities($path);
exit(0);
}

if (empty($rev)) {
$rev = $logEntry->rev;
}
Expand Down

0 comments on commit 24fefca

Please sign in to comment.