From 04e783a8861ea5def23147322489f2624b45dc0a Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 24 Oct 2012 17:50:45 -0700 Subject: [PATCH] io.files.info.unix: errno EACCES should be handled separately. --- basis/io/files/info/unix/unix.factor | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/basis/io/files/info/unix/unix.factor b/basis/io/files/info/unix/unix.factor index a39999a0bc..4646d360f4 100644 --- a/basis/io/files/info/unix/unix.factor +++ b/basis/io/files/info/unix/unix.factor @@ -2,8 +2,8 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.c-types alien.data arrays calendar calendar.unix classes.struct combinators -combinators.short-circuit io.backend -io.files.info io.files.types kernel literals math math.bitwise +combinators.short-circuit io.backend io.files.info +io.files.types kernel libc literals math math.bitwise sequences specialized-arrays strings system unix unix.ffi unix.groups unix.stat unix.time unix.users vocabs ; IN: io.files.info.unix @@ -284,8 +284,17 @@ PRIVATE> [ drop file-type>executable ] } case ; -M: unix file-readable? normalize-path R_OK access io-error t ; -M: unix file-writable? normalize-path W_OK access io-error t ; -M: unix file-executable? normalize-path X_OK access io-error t ; + + +M: unix file-readable? R_OK access? ; +M: unix file-writable? W_OK access? ; +M: unix file-executable? X_OK access? ; "io.files.info.unix." os name>> append require