aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2011-07-04 15:44:52 +0200
committerLars Magne Ingebrigtsen2011-07-04 15:44:52 +0200
commitc4f2d8d48d29b35ba5f0d7734be8e8b0b8b71798 (patch)
tree0299cca6ec76a73680a0e7d79c411fe241c0a7ee /src/fileio.c
parentc1e57b47608627bf9432e5e32efc7457b49a991c (diff)
downloademacs-c4f2d8d48d29b35ba5f0d7734be8e8b0b8b71798.tar.gz
emacs-c4f2d8d48d29b35ba5f0d7734be8e8b0b8b71798.zip
* fileio.c (barf_or_query_if_file_exists): Check first if the file
is a directory before asking whether to use the file name (bug#7564).
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 27fef42960a..6a4d1c55680 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1755,6 +1755,10 @@ barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
1755 regardless of what access permissions it has. */ 1755 regardless of what access permissions it has. */
1756 if (lstat (SSDATA (encoded_filename), &statbuf) >= 0) 1756 if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
1757 { 1757 {
1758 if (Ffile_directory_p (absname))
1759 xsignal2 (Qfile_error,
1760 build_string ("File name is a directory"), absname);
1761
1758 if (! interactive) 1762 if (! interactive)
1759 xsignal2 (Qfile_already_exists, 1763 xsignal2 (Qfile_already_exists,
1760 build_string ("File already exists"), absname); 1764 build_string ("File already exists"), absname);