download manager: display downloads properly again
Commit
080e20e (download manager: show display name, allow target file
name to change, 2009-02-18) broke the download manager display of most
downloads.
There are two separate interfaces for downloading files that use
different methods; (1) the save interactive command and (2) choosing
"save" in response to the "Action to perform" prompt when visiting a
download url. That commit was tested for case (1) but not case (2).
The one line of code changed in this commit had two errors;
this.mozilla_info was not yet set (it is set a couple of lines later)
and mozilla_info.targetFile is not set at the time that attach() is
called.
The fix restores the previous behaviour of target_file being a getter,
if it is not already set.
It may be that the two methods could be changed to use the same
underlying interface and so simplify this code and obviate the need
for the changes in commit
9645e93 (save_uri: optionally use a
temporary download file, 2009-02-18).