Commit 6e9b2be9 authored by Paul Eggert's avatar Paul Eggert

* fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.

This is more efficient than Ffile_directory_p and avoids a minor race.
parent c8af70e1
2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
This is more efficient than Ffile_directory_p and avoids a minor race.
2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
* buffer.c (Foverlay_put): Say what the return value is
......
......@@ -1755,7 +1755,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
regardless of what access permissions it has. */
if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
{
if (Ffile_directory_p (absname))
if (S_ISDIR (statbuf.st_mode))
xsignal2 (Qfile_error,
build_string ("File is a directory"), absname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment