[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104947: * fileio.c (barf_or_query_if
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104947: * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. |
Date: |
Mon, 04 Jul 2011 10:50:12 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104947
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2011-07-04 10:50:12 -0700
message:
* fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
This is more efficient than Ffile_directory_p and avoids a minor race.
modified:
src/ChangeLog
src/fileio.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-07-04 15:32:22 +0000
+++ b/src/ChangeLog 2011-07-04 17:50:12 +0000
@@ -1,3 +1,8 @@
+2011-07-04 Paul Eggert <address@hidden>
+
+ * 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 <address@hidden>
* buffer.c (Foverlay_put): Say what the return value is
=== modified file 'src/fileio.c'
--- a/src/fileio.c 2011-07-04 14:34:31 +0000
+++ b/src/fileio.c 2011-07-04 17:50:12 +0000
@@ -1755,7 +1755,7 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104947: * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.,
Paul Eggert <=