@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+1 -1
+1 -1
src/applications/phragment/storage/PhragmentFragment.php
··· 203 203 $children = id(new PhragmentFragmentQuery()) 204 204 ->setViewer($viewer) 205 205 ->needLatestVersion(true) 206 - ->withPaths($paths) 206 + ->withLeadingPath($this->getPath().'/') 207 207 ->execute(); 208 208 $children = mpull($children, null, 'getPath'); 209 209