Throw exception if repository doesn't exist

This commit is contained in:
Dennis Eichhorn 2016-06-04 18:32:01 +02:00
parent 1892f33f68
commit 1c5f0026de

View File

@ -689,7 +689,11 @@ class Repository
continue;
}
$fh = fopen($this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line, 'r');
$fh = fopen($path = $this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line, 'r');
if(!$fh) {
throw new PathException($path);
}
while (!feof($fh)) {
fgets($fh);