From 8acd596925a8e9a19c0a53505ec2a98b50bb6cc1 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Wed, 28 Mar 2012 20:43:48 -0700 Subject: [PATCH] Set full path for DiffusionRepositoryPath in svn diffusion browse query Summary: The full path field of the DiffusionRepositoryPath object is used by the DiffusionBrowseController when viewing a directory with a readme file, so we should set this field. Test Plan: loaded a directory containing a readme in a svn repo Reviewers: epriestley, jungejason, emiraga Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2045 --- .../diffusion/query/browse/svn/DiffusionSvnBrowseQuery.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/applications/diffusion/query/browse/svn/DiffusionSvnBrowseQuery.php b/src/applications/diffusion/query/browse/svn/DiffusionSvnBrowseQuery.php index 55e3afd636..d7699ff74a 100644 --- a/src/applications/diffusion/query/browse/svn/DiffusionSvnBrowseQuery.php +++ b/src/applications/diffusion/query/browse/svn/DiffusionSvnBrowseQuery.php @@ -171,11 +171,13 @@ final class DiffusionSvnBrowseQuery extends DiffusionBrowseQuery { $results = array(); foreach ($browse as $file) { - $file_path = $file['pathName']; - $file_path = ltrim(substr($file_path, strlen($path_normal)), '/'); + $full_path = $file['pathName']; + $file_path = ltrim(substr($full_path, strlen($path_normal)), '/'); + $full_path = ltrim($full_path, '/'); $result = new DiffusionRepositoryPath(); $result->setPath($file_path); + $result->setFullPath($full_path); // $result->setHash($hash); $result->setFileType($file['fileType']); // $result->setFileSize($size);