Closed Bug 128367 Opened 23 years ago Closed 22 years ago

Save button and menu command silently fails to save to write-protected file.

Categories

(Core :: DOM: Editor, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: wdc, Assigned: Brade)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

I was editing an HTML file in Composer that happened to be under RCS.
I'd forgotten to check the file out, so it was write protected.

Through my whole editing session I'd been pressing the save button
and watching it grey-out indicative of success.

When none of my changes had actually made it into the file, I investigated.

Apparently using the save button on a write-protected file PRETENDS to 
succeed.

Using the Save As... command correctly recognized that the file was
write protected.  Both the button and the menu command for Save
gave NO INDICATION WHATSOEVER that the save had failed.

This is with the Composer that shipped with Mozilla 0.9.8 talkback release
ID 2002020415.
I am seeing this problem on Win 98 using the 03-01 trunk build.  

Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reassigning to brade and ccing cmanske per Sujay's request.
Assignee: kin → brade
The following may also be related to the same block of code:

ANY save silently thinks it succeeded if you happen to overrun your
disk quota. I got NO indication that large PDF files I was saving
were not being saved owing to my having no disk quota.

SOMEBODY is not testing for enough error return statuses on save.
The over-quota is happening in the browser, I'm reasonably sure it
will be happening in Composer too.

Do y'all want to keep the quota silent failure in this bug, or should
I open a new one?
This is one of the conditions Bill told me about that nsIWebBrowserPersist
error handling fails to detect. Reassign to him?
No, I've given that bug over to Adam Lock.
Status: NEW → ASSIGNED
Keywords: nsbeta1, regression
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.0
This patch ensures that persist code passes on any errors encountered when
saving.  With this patch, the UI will not act like it successfully saved
however, there isn't any dialog (that will be in a separate patch/attachment).
Comment on attachment 72786 [details] [diff] [review]
minimum patch (for 0.9.9?)

r=adamlock
Attachment #72786 - Flags: review+
This fix is for Composer only.	Composer was only displaying error messages
when errors were thrown and not when the save failed by returning an error. 
This fix moves the dialog out of the catch.
Comment on attachment 72789 [details] [diff] [review]
Composer portion of fix; if saving failed we should tell user (not just when error thrown)

r=adamlock
Attachment #72789 - Flags: review+
more context in this version; easier to understand what's going on
Attachment #72789 - Attachment is obsolete: true
Comment on attachment 72786 [details] [diff] [review]
minimum patch (for 0.9.9?)

sr=kin@netscape.com
Attachment #72786 - Flags: superreview+
Comment on attachment 72789 [details] [diff] [review]
Composer portion of fix; if saving failed we should tell user (not just when error thrown)

sr=kin@netscape.com
Attachment #72789 - Attachment is obsolete: false
Attachment #72789 - Flags: superreview+
Attachment #72790 - Attachment is obsolete: true
Keywords: mozilla0.9.9
Target Milestone: mozilla1.0 → mozilla0.9.9
Comment on attachment 72786 [details] [diff] [review]
minimum patch (for 0.9.9?)

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #72786 - Flags: approval+
Comment on attachment 72789 [details] [diff] [review]
Composer portion of fix; if saving failed we should tell user (not just when error thrown)

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #72789 - Flags: approval+
fix checked into 1.0 trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.9 → mozilla1.0
*** Bug 131108 has been marked as a duplicate of this bug. ***
Verified on Win Xp using the 04-30 trunk build.

I now receive a message that says "Saving file failed"

Marking VERIFIED.

If anyone is still able to reproduce this problem, feel free to reopen this bug.
Status: RESOLVED → VERIFIED
*** Bug 144697 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: