diff --git a/racket/src/racket/src/file.c b/racket/src/racket/src/file.c index 2c745f2d98..1209ef82f3 100644 --- a/racket/src/racket/src/file.c +++ b/racket/src/racket/src/file.c @@ -6088,12 +6088,10 @@ static Scheme_Object *file_or_dir_permissions(int argc, Scheme_Object *argv[]) } while ((ok == -1) && (errno == EINTR)); execute = !ok; - /* Don't fail at the exec step if the user is the - superuser and errno is EPERM; under Mac OS X, - at least, such a failure simply means tha the - file is not executable. */ - if (ok && (errno != EACCES) - && (uid || gid || (errno != EPERM))) { + /* Don't fail at the exec step if errno is EPERM; under Mac OS + X, at least, such a failure simply means that the file is + not executable. */ + if (ok && (errno != EACCES) && (errno != EPERM)) { l = NULL; } else { if (read)