mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 17:08:22 +01:00
Fix deletion detection when updating based on ZIP
Summary: When the code to update based on ZIP went to look up the child fragments, it explicitly used the paths provided in the ZIP. This meant that we could never detect omissions because there'd never be a scenario where a child fragment would return but not exist in the ZIP. To fix this, the query should be using `withLeadingPath` instead of `withPaths`. Test Plan: Uploaded a ZIP that omitted a file and saw the `deleteFile` get called (by placing debugging output in the code). Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Maniphest Tasks: T4205 Differential Revision: https://secure.phabricator.com/D7736
This commit is contained in:
parent
acd5d5ae4a
commit
67b37a5c1d
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ final class PhragmentFragment extends PhragmentDAO
|
|||
$children = id(new PhragmentFragmentQuery())
|
||||
->setViewer($viewer)
|
||||
->needLatestVersion(true)
|
||||
->withPaths($paths)
|
||||
->withLeadingPath($this->getPath().'/')
|
||||
->execute();
|
||||
$children = mpull($children, null, 'getPath');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue