mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Mark diffusion browse result as empty directory when appropriate
Summary: When selecting children of a directory, it is possible that none of its children exist anymore even though the directory still exists. After fetching the children but before returning them, we should check whether there are any, and if there are no children, set the reason as empty directory. Test Plan: In sandbox, browsed in diffusion to a directory that exists but has no files and saw that it has a useful message instead of a vague exception. Reviewers: epriestley, tuomaspelkonen, jungejason Reviewed By: tuomaspelkonen CC: aran, tuomaspelkonen Differential Revision: 846
This commit is contained in:
parent
fbef90c4c6
commit
bd2b557b42
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ final class DiffusionSvnBrowseQuery extends DiffusionBrowseQuery {
|
|||
$results[] = $result;
|
||||
}
|
||||
|
||||
if (empty($results)) {
|
||||
$this->reason = self::REASON_IS_EMPTY;
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue