Open Bug 191877 Opened 23 years ago Updated 3 years ago

writing to the file stream is not returning the right error

Categories

(Core :: Networking, defect, P5)

x86
Linux
defect

Tracking

()

People

(Reporter: timonchristl, Unassigned)

References

Details

(Whiteboard: [necko-would-take])

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 When trying to save a large downloaded file to a directory on which there is a quota set and if the hard limit of that quota is it, the following error message appears: "%S could not be saved, because an unknown error occurred.\n\nSorry about that. Try saving to a different location." (Defined in mozilla/embedding/components/webbrowserpersist/locale/en-US/nsWebBrowserPersist.properties). This error message is misleading because the actual reason is "disk full", for which there is already a more descriptive error message. Reproducible: Always Steps to Reproduce: 1. Prepare a new user (let's call it "test") and give it a sufficiently small quota (e.g soft limit 5MB, hard limit 10MB) 2. Download a file which will is larger than the user's hard limit and save it into the home directory of user "test" 3. Wait until error message appears Actual Results: writeError message appears Expected Results: diskFull message should appear I don't if it makes any difference, but the filesystem I used for testing this was mounted over NFS.
Sounds like we're not getting the right error code out of necko....
Assignee: blaker → dougt
Component: Download Manager → Networking: File
QA Contact: petersen → benc
bug 72892? (hard to find b/c it's in xpcom...) I think this bug is a depends of that bug, because in theory, if we all doing compotent-level file i/o tests, EVERY component that wrote to disk would have this problem.
Assignee: dougt → law
Component: Networking: File → File Handling
QA Contact: benc → petersen
Well, the core problem is that the error message returned from Write() is just NS_ERROR_FAILURE, not an error that says there is no space on disk. Do your component tests attempt to write to disk in space-limited-by-quota conditions? None of the file handling code is calling GetDiskSpaceAvailable (which is a separate issue, but it wouldn't help much even if we did). The point is, writing to the file stream is not returning the right error.
Assignee: law → dougt
Component: File Handling → Networking: File
QA Contact: petersen → benc
Summary: Error message when a download could not be saved is sometimes misleading → writing to the file stream is not returning the right error
-> darin
Assignee: dougt → darin
Target Milestone: --- → Future
-> default owner
Assignee: darin → nobody
Component: Networking: File → Networking
QA Contact: benc → networking
Target Milestone: Future → ---
See Also: → 931720
Whiteboard: [necko-would-take]
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.