[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file-exists? using stat

From: Kevin Ryde
Subject: file-exists? using stat
Date: Wed, 10 Sep 2003 09:00:37 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

        * boot-9.scm (file-exists?): Use stat rather than access?, so as to
        follow the effective UID/GID not the real ID.  file-exists? will
        normally be used as a prelude to opening or some other operation, and
        it's the effective ID which will apply there.

For instance, testing before opening is precisely what
documentation.scm and slib.scm use file-exists? for.  And Emacs
file-exists-p uses stat(), I imagine for reasons along these lines.

Speaking of stat, it's actually provided unconditionally isn't it?
Meaning presumably there's no need to test (provided? 'posix) before
using it in file-is-directory? or now in file-exists?.

I'd be a bit inclined to apply this as a fix to the 1.6 branch too.

Attachment: boot-9.scm.file-exists.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]