diff options
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 27fef42960a..c6f8dfe4683 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 (S_ISDIR (statbuf.st_mode)) | ||
| 1759 | xsignal2 (Qfile_error, | ||
| 1760 | build_string ("File 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); |