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

RESOLVED FIXED

Status

()

Toolkit
Add-ons Manager
P3
normal
RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: timeless, Assigned: Ben Goodger (use ben at mozilla dot org for email))

Tracking

({fixed-aviary1.0})

unspecified
fixed-aviary1.0
Points:
---
Bug Flags:
blocking-aviary1.0PR +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

1.63 KB, patch
asa
: review+
Details | Diff | Splinter Review
(Reporter)

Description

14 years ago
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.

Comment 1

14 years ago
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?

Comment 2

14 years ago
Created attachment 153049 [details] [diff] [review]
Proposed patch

This what you had in mind?

Updated

14 years ago
Attachment #153049 - Flags: review?(timeless)

Comment 3

14 years ago
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
(Reporter)

Comment 4

14 years ago
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)

Updated

14 years ago
Flags: blocking-aviary1.0PR?

Updated

14 years ago
Whiteboard: [have patch]

Comment 5

14 years ago
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+

Comment 6

14 years ago
think this has been fixed and the patch would be obosolete.  if not renominate.

thanks

Comment 7

14 years ago
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?

Comment 8

14 years ago
seek renomination for this bug; I've seen problems when uninstalling

mconnor--please review! :-)
Flags: blocking-aviary1.0- → blocking-aviary1.0?

Updated

14 years ago
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+

Updated

14 years ago
Attachment #153049 - Flags: approval-aviary?

Comment 10

14 years ago
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+

Comment 12

14 years ago
moconnor or ben, can you land this soon?
Whiteboard: [have patch] mconnor, ben, blake → [have patch] ready to land

Comment 13

14 years ago
I need to make a new version without the superfluous braces *grumble*. I'll
do it this afternoon...

Comment 14

14 years ago
Created attachment 157844 [details] [diff] [review]
New patch without superfluous braces

It took me a while to remember how to reproduce the original problem
(cd ~/,mozilla/firefox/default*; rm -rf extensions chrome/chrome.rdf)

Updated

14 years ago
Attachment #153049 - Attachment is obsolete: true

Comment 15

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
Keywords: fixed-aviary1.0
Whiteboard: [have patch] ready to land

Updated

14 years ago
Flags: blocking-aviary1.0?

Comment 17

14 years ago
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.