Closed Bug 187605 Opened 22 years ago Closed 22 years ago

nsLocalFileCommon's InitWithFile should throw NS_ERROR_INVALID_ARG instead

Categories

(Core :: XPCOM, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: dougt)

Details

Attachments

(1 file)

The everything-except-mac method InitWithFile (
http://lxr.mozilla.org/mozilla/source/xpcom/io/nsLocalFileCommon.cpp#59 ) in
nsLocalFileCommon currently throws the rather meaningless NS_ERROR_FAILURE when
the path is empty, whereas the mac-specific InitWithNativePath (
http://lxr.mozilla.org/mozilla/source/xpcom/io/nsLocalFileMac.cpp#1107 ) throws
NS_ERROR_INVALID_ARG at the same check.

According to biesi, NS_ERROR_INVALID_ARG makes more sense. Severity "minor" as
this is a one-line-fix.
post a patch?
Attached patch 1st patchSplinter Review
Attachment #110603 - Flags: superreview+
> post a patch?

Give me a break, I submitted it 11 minutes after filing the bug :-)
Attachment #110603 - Flags: review?(dougt)
Comment on attachment 110603 [details] [diff] [review]
1st patch

r=dougt
Attachment #110603 - Flags: review?(dougt) → review+
Comment on attachment 110603 [details] [diff] [review]
1st patch

let me know if you need this checked in.
fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
> let me know if you need this checked in.Should you refer to me: Yes, please.
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: