Attachment #575097 - Flags: review?(myk)
(Also, PR_RDONLY is the same as 0444 permissions, right?)
Comment on attachment 575097 [details] [diff] [review] s/0444/PR_RDONLY/ (In reply to Wes Kocher (:KWierso) (Jetpack Bugmaster) from comment #1) > (Also, PR_RDONLY is the same as 0444 permissions, right?) No, PR_RDONLY is 0x01 <http://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/include/prio.h#616>. FileInputStream creates an nsIFileInputStream and calls its `init` method <http://mxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIFileStreams.idl>, whose `perm` argument takes file mode bits as described in prio.h <http://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/include/prio.h#626>. We could convert these numbers to decimal (292) or hexadecimal (0x124), but they're most readable as octals, so let's use `parseInt` to represent them as such while avoiding the warning: parseInt("444", 8)
Attachment #575097 - Flags: review?(myk) → review-
Created attachment 576357 [details] [diff] [review] parseInt("444", 8) So, like this?
Comment on attachment 576357 [details] [diff] [review] parseInt("444", 8) Exactly.
Attachment #576357 - Flags: review?(myk) → review+
Commit pushed to https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/ad778b71bfd62ce2219d5d419d727aaa59ed2f0d fix bug 703195 - httpd module tests throw warnings about octals - replace deprecated octal literals with parseInt(octal, 8) calls; r=myk
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.