File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ Item.prototype.canRead = function() {
108
108
const uid = getUid ( ) ;
109
109
const gid = getGid ( ) ;
110
110
let can = false ;
111
- if ( uid === 0 ) {
111
+ if ( process . getuid && uid === 0 ) {
112
112
can = true ;
113
113
} else if ( uid === this . _uid ) {
114
114
can = ( permissions . USER_READ & this . _mode ) === permissions . USER_READ ;
@@ -128,7 +128,7 @@ Item.prototype.canWrite = function() {
128
128
const uid = getUid ( ) ;
129
129
const gid = getGid ( ) ;
130
130
let can = false ;
131
- if ( uid === 0 ) {
131
+ if ( process . getuid && uid === 0 ) {
132
132
can = true ;
133
133
} else if ( uid === this . _uid ) {
134
134
can = ( permissions . USER_WRITE & this . _mode ) === permissions . USER_WRITE ;
@@ -148,7 +148,7 @@ Item.prototype.canExecute = function() {
148
148
const uid = getUid ( ) ;
149
149
const gid = getGid ( ) ;
150
150
let can = false ;
151
- if ( uid === 0 ) {
151
+ if ( process . getuid && uid === 0 ) {
152
152
can = true ;
153
153
} else if ( uid === this . _uid ) {
154
154
can = ( permissions . USER_EXEC & this . _mode ) === permissions . USER_EXEC ;
You can’t perform that action at this time.
0 commit comments