Closed Bug 735926 Opened 13 years ago Closed 13 years ago

NetUtil.asyncCopy fails to copy from a fileInputStream to a fileOutputStream

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ddahl, Unassigned)

Details

Attachments

(1 file)

While working on bug 716174 - i noticed that asyncCopy seems to fail silently when you want to copy from a fileinputstream to a fileoutputstream. We should add that support.
Blocks: 716174
OS: Linux → All
Hardware: x86_64 → All
This should be working, in general. Where is it failing?
(In reply to Boris Zbarsky (:bz) from comment #1) > This should be working, in general. Where is it failing? I get a file-input-stream and create a new backup file, get the file-output-stream, and attempt NetUtil.asyncCopy: https://bugzilla.mozilla.org/attachment.cgi?id=594329&action=diff#a/toolkit/mozapps/shared/FileUtils.jsm_sec3 It seems like there is a silent failure and the outputfile is never written to. At one point I saw an intermittent error message, once. I will re-apply this patch and see if I see it again.
A testcase actually showing the problem (e.g. when run in the error console) would be a good start...
It looks like this is an INVALID bug and my problem in bug 716174 are race condition related. I would like confirmation if you have a second.
Attachment #606346 - Flags: feedback?(bzbarsky)
Comment on attachment 606346 [details] [diff] [review] testcase that proves me wrong Seems reasonably, though: 1) It's worth checking that ofile ended up with the right data in it. 2) The write() call would look better like this: var data = "This is a test"; fos.write(data, data.length);
Attachment #606346 - Flags: feedback?(bzbarsky) → feedback+
So can we mark this INVALID?
Sorry, forgot to mark it INVALID
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: