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
Unknown Object (File)
Tue, Jan 28, 6:04 AM
Unknown Object (File)
Fri, Jan 17, 4:33 PM
Unknown Object (File)
Fri, Jan 10, 11:19 AM
Unknown Object (File)
Mon, Jan 6, 4:44 PM
Unknown Object (File)
Sun, Jan 5, 1:09 AM
Unknown Object (File)
Fri, Jan 3, 6:50 PM
Unknown Object (File)
Dec 27 2024, 1:55 PM
Unknown Object (File)
Dec 25 2024, 5:13 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.)