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)
Core
Networking
Tracking
()
RESOLVED
INVALID
People
(Reporter: ddahl, Unassigned)
Details
Attachments
(1 file)
4.16 KB,
patch
|
bzbarsky
:
feedback+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Updated•13 years ago
|
![]() |
||
Comment 1•13 years ago
|
||
This should be working, in general. Where is it failing?
Reporter | ||
Comment 2•13 years ago
|
||
(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.
![]() |
||
Comment 3•13 years ago
|
||
A testcase actually showing the problem (e.g. when run in the error console) would be a good start...
Reporter | ||
Comment 4•13 years ago
|
||
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 5•13 years ago
|
||
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+
Comment 6•13 years ago
|
||
So can we mark this INVALID?
Reporter | ||
Comment 7•13 years ago
|
||
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.
Description
•