1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-28 04:00:17 +01:00

Fix diffusion browse queries in git

Summary:
If you try to load a directory in diffusion in a git repo that has a readme
file and you don't include a trailing slash in the path, you get an error
because we don't assemble the full paths of files correctly. This fixes that.

Test Plan: load such a directory in diffusion and see no fatal

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3533
This commit is contained in:
Nick Harper 2012-11-21 13:48:27 -08:00
parent abd880e30f
commit b5c7896b10

View file

@ -83,7 +83,7 @@ final class DiffusionGitBrowseQuery extends DiffusionBrowseQuery {
}
}
$result->setFullPath($path.$name);
$result->setFullPath(rtrim($path, '/').'/'.$name);
$result->setPath($name);
$result->setHash($hash);
$result->setFileType($file_type);