[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104942: * fileio.c (barf_or_query_if
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104942: * fileio.c (barf_or_query_if_file_exists): Check first if the file |
Date: |
Mon, 04 Jul 2011 15:44:52 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104942
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2011-07-04 15:44:52 +0200
message:
* 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).
modified:
src/ChangeLog
src/fileio.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-07-04 12:22:39 +0000
+++ b/src/ChangeLog 2011-07-04 13:44:52 +0000
@@ -1,5 +1,9 @@
2011-07-04 Lars Magne Ingebrigtsen <address@hidden>
+ * 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).
+
* fns.c (Frequire): Remove the mention of the .gz files, since
that's installation-specific, but keep the mention of
`get-load-suffixes'.
=== modified file 'src/fileio.c'
--- a/src/fileio.c 2011-06-24 21:25:22 +0000
+++ b/src/fileio.c 2011-07-04 13:44:52 +0000
@@ -1755,6 +1755,10 @@
regardless of what access permissions it has. */
if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
{
+ if (Ffile_directory_p (absname))
+ xsignal2 (Qfile_error,
+ build_string ("File name is a directory"), absname);
+
if (! interactive)
xsignal2 (Qfile_already_exists,
build_string ("File already exists"), absname);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104942: * fileio.c (barf_or_query_if_file_exists): Check first if the file,
Lars Magne Ingebrigtsen <=