Closed Bug 245109 Opened 20 years ago Closed 20 years ago

Do not try to remove a file that does not exist - Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.remove]"

Categories

(Toolkit :: Add-ons Manager, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: bugs)

References

()

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file, 1 obsolete file)

steps:
1. build firefox
2. run firefox
3. read console

actual output:
*** eeeeeeee = [Exception... "Component returned failure code: 0x80520012
(NS_ERROR_FILE_NOT_FOUND) [nsIFile.remove]"  nsresult: "0x80520012
(NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame ::
file:///Users/timeless/opt-powerpc-apple-darwin7.4.0-firebird/dist/Firefox.app/Contents/MacOS/components/nsExtensionManager.js
:: ensureExtensionsFiles :: line 217"  data: no]

expected output:
none.

this has been reported in
		bugzilla-daemon (3)	 	Inbox [Bug 244668] [trunk] Profile Manager broken in OS
X  - http://bugzilla.mozilla.org/show_bug.cgi?id=244668 - Additional Comments
From risc …	 	May 29
		bugzilla-daemon (8)	 	Inbox [Bug 243315] Official Firefox Linux GTK2+Xft
builds do no... - http://bugzilla.mozilla.org/show_bug.cgi?id=243315
aebrahim@uchicago.edu changed: What |Removed …	 	May 19

Resolution:
stash the GetFile result, check to see that the file exists and only delete it
if it does.
This isn't Mac-specific, but I'm apparently not empowered-enough to edit that.

Also, it's kindof ugly, so I think it should fixed before 1.0...
Flags: blocking-aviary1.0?
Attached patch Proposed patch (obsolete) — Splinter Review
This what you had in mind?
Attachment #153049 - Flags: review?(timeless)
Seems like a simple, low-risk patch.  Plussing to get on Ben's radar.
Flags: blocking-aviary1.0? → blocking-aviary1.0+
OS: MacOS X → All
Priority: -- → P3
Hardware: Macintosh → All
Comment on attachment 153049 [details] [diff] [review]
Proposed patch

yes, but i don't review code in firefox.
Attachment #153049 - Flags: review?(timeless) → review?(mconnor)
Flags: blocking-aviary1.0PR?
Whiteboard: [have patch]
think this have been fixed and the patch would be obosolete.  if not renominate.

thanks
Flags: blocking-aviary1.0PR?
Flags: blocking-aviary1.0PR-
Flags: blocking-aviary1.0-
Flags: blocking-aviary1.0+
think this has been fixed and the patch would be obosolete.  if not renominate.

thanks
I (In reply to comment #6)
> think this has been fixed and the patch would be obosolete.  if not renominate.

I don't think it's been fixed, but Ben has added a comment:

      // XXXben - do this only for profile until we have a better protection
      // mechanism for global items.

I still think the patch is trivial, and removes an ugliness that shouldn't
be exposed in a preview release...


Flags: blocking-aviary1.0PR- → blocking-aviary1.0PR?
seek renomination for this bug; I've seen problems when uninstalling

mconnor--please review! :-)
Flags: blocking-aviary1.0- → blocking-aviary1.0?
Whiteboard: [have patch] → [have patch] mconnor, ben, blake
Comment on attachment 153049 [details] [diff] [review]
Proposed patch

r=mconnor@steelgryphon.com (minus the bitrot of course)

As bz usually says about these: "error checking is a good thing"
Attachment #153049 - Flags: review?(mconnor) → review+
Attachment #153049 - Flags: approval-aviary?
is this ready to check in?
Flags: blocking-aviary1.0PR? → blocking-aviary1.0PR+
Comment on attachment 153049 [details] [diff] [review]
Proposed patch

>+      if (chromedsFile.exists()) {
>+        chromedsFile.remove(false);
>+      }

No braces around 1-line sub-blocks in my files!

Fix that and r+a=ben@mozilla.org
Attachment #153049 - Flags: approval-aviary? → approval-aviary+
moconnor or ben, can you land this soon?
Whiteboard: [have patch] mconnor, ben, blake → [have patch] ready to land
I need to make a new version without the superfluous braces *grumble*. I'll
do it this afternoon...
It took me a while to remember how to reproduce the original problem
(cd ~/,mozilla/firefox/default*; rm -rf extensions chrome/chrome.rdf)
Attachment #153049 - Attachment is obsolete: true
Comment on attachment 157844 [details] [diff] [review]
New patch without superfluous braces

bugzilla doesn't seem to know who ben@mozilla.org is
Attachment #157844 - Flags: review?(bugs)
Attachment #157844 - Flags: approval-aviary?
r+a=ben@mozilla.org, landed. 
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Keywords: fixed-aviary1.0
Whiteboard: [have patch] ready to land
Flags: blocking-aviary1.0?
Comment on attachment 157844 [details] [diff] [review]
New patch without superfluous braces

a=asa for aviary checkin.
Attachment #157844 - Flags: review?(bugs)
Attachment #157844 - Flags: review+
Attachment #157844 - Flags: approval-aviary?
Attachment #157844 - Flags: approval-aviary+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: