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
F14057527: D7735.diff
Sun, Nov 17, 4:17 AM
F13994385: D7735.id.diff
Wed, Oct 23, 5:47 AM
F13976673: D7735.id17492.diff
Oct 18 2024, 3:16 PM
F13976000: D7735.diff
Oct 18 2024, 12:30 PM
F13975353: D7735.id17480.diff
Oct 18 2024, 9:47 AM
Unknown Object (File)
Oct 11 2024, 7:30 PM
Unknown Object (File)
Oct 11 2024, 1:37 AM
Unknown Object (File)
Oct 5 2024, 3:49 PM

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.)