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)
Mon, Mar 25, 4:19 AM
Unknown Object (File)
Feb 7 2024, 8:40 AM
Unknown Object (File)
Dec 21 2023, 1:49 AM
Unknown Object (File)
Dec 1 2023, 5:06 PM
Unknown Object (File)
Nov 23 2023, 12:46 PM
Unknown Object (File)
Nov 12 2023, 2:22 PM
Unknown Object (File)
Oct 29 2023, 8:56 PM
Unknown Object (File)
Oct 27 2023, 5:49 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.)