Fix how file size is calculated if not provided
am: 120ba1db4d

Change-Id: I240f7fc0955aa6ec9d1e4e18cf217eac2b3aa394