Closed Bug 315305 Opened 19 years ago Closed 17 years ago

Improve nsILocalFile error reporting on Mac

Categories

(Core :: XPCOM, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

References

Details

Attachments

(1 file, 1 obsolete file)

nsLocalFileOSX ignores a bunch of error codes when mapping OS errors to nsresults. We need to add some so that we can show better error messages.
Attached patch Patch (obsolete) — Splinter Review
Attachment #202024 - Flags: superreview?(dougt)
Attachment #202024 - Flags: review?(ccarlen)
Blocks: 314803
Comment on attachment 202024 [details] [diff] [review]
Patch

This is the wrong file
Attachment #202024 - Attachment is obsolete: true
Attachment #202024 - Flags: superreview?(dougt)
Attachment #202024 - Flags: review?(ccarlen)
Attached patch PatchSplinter Review
Attachment #202025 - Flags: superreview?(dougt)
Attachment #202025 - Flags: review?(ccarlen)
Comment on attachment 202025 [details] [diff] [review]
Patch

r=ccarlen

         case fLckdErr:
+        case afpVolLocked:
             outErr = NS_ERROR_FILE_IS_LOCKED;

I wish we had a separate NS_ERROR for a drive being read-only vs. a file. But, even this case is an improvement over what we have
Attachment #202025 - Flags: review?(ccarlen) → review+
mass reassigning to nobody.
Assignee: dougt → nobody
Comment on attachment 202025 [details] [diff] [review]
Patch

This patch is fine and compiles for me on the 1.8 branch.
Attachment #202025 - Flags: superreview?(dougt) → superreview+
Comment on attachment 202025 [details] [diff] [review]
Patch

note that the callers of local file may get more specific error codes returned from our interfaces.
Assignee: nobody → sfraser_bugs
Sorry, no time. Who is XPCOM module owner these days?
Assignee: sfraser_bugs → nobody
Assignee: nobody → sfraser_bugs
Attachment #202025 - Flags: approval1.9? → approval1.9+
smfr, do you want somebody else to check this in for you?
Checking in xpcom/io/nsLocalFileOSX.cpp;
/cvsroot/mozilla/xpcom/io/nsLocalFileOSX.cpp,v  <--  nsLocalFileOSX.cpp
new revision: 1.55; previous revision: 1.54
done
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
Thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: