Page MenuHomePhabricator

Correctly handle downloading ZIP with empty directories in Phragment
ClosedPublic

Authored by hach-que on Dec 7 2013, 6:14 AM.
Tags
None
Referenced Files
F18462622: D7735.id.diff
Sep 1 2025, 10:43 PM
F18432463: D7735.diff
Aug 31 2025, 6:41 AM
F18114467: D7735.id17480.diff
Aug 13 2025, 4:35 AM
F18108198: D7735.id17492.diff
Aug 11 2025, 5:24 AM
F18099428: D7735.id17480.diff
Aug 9 2025, 4:54 AM
F17950497: D7735.id.diff
Aug 1 2025, 12:28 AM
Unknown Object (File)
Jul 1 2025, 11:42 PM
Unknown Object (File)
Jun 30 2025, 6:55 AM

Details

Summary

This logic causes an exception because getPHID() is called on a fragment that has no latest version. This fixes the code so that in this scenario, it returns an empty array (with no path to be added to the ZIP).

Test Plan

Downloaded the ZIP successfully after the patch was applied.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

(I'm not 100% sure we don't already, but maybe we should add an empty directory to the zip? We can kind of get away without doing that because Git doesn't, but if we don't have a compelling technical reason not to do this I think it's a more intuitive behavior.)