| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,10 +200,11 @@ fs.Stats.prototype.isSocket = function() { | |||
| 200 | 200 | }; | |
| 201 | 201 | ||
| 202 | 202 | // Don't allow mode to accidentally be overwritten. | |
| 203 | - ['F_OK', 'R_OK', 'W_OK', 'X_OK'].forEach(function(key) { | ||
| 204 | - Object.defineProperty(fs, key, { | ||
| 205 | - enumerable: true, value: constants[key] || 0, writable: false | ||
| 206 | - }); | ||
| 203 | + Object.defineProperties(fs, { | ||
| 204 | + F_OK: {enumerable: true, value: constants.F_OK || 0}, | ||
| 205 | + R_OK: {enumerable: true, value: constants.R_OK || 0}, | ||
| 206 | + W_OK: {enumerable: true, value: constants.W_OK || 0}, | ||
| 207 | + X_OK: {enumerable: true, value: constants.X_OK || 0}, | ||
| 207 | 208 | }); | |
| 208 | 209 | ||
| 209 | 210 | function handleError(val, callback) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments