summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-01-28 12:47:05 -0500
committerChong Yidong <cyd@stupidchicken.com>2010-01-28 12:47:05 -0500
commite3a09b87b98a619ecbe14bb2e4beb1ff5ed21a5a (patch)
tree9eb0b9b5f04b1bf86c018c32cf53eaea1b8f0dbb
parentf8916aa605cfbb6cb9889d0a475b41e55f6d2d0e (diff)
downloademacs-e3a09b87b98a619ecbe14bb2e4beb1ff5ed21a5a.tar.gz
* fileio.c (Frename_file): Fix last change (Bug#5487).
-rw-r--r--src/ChangeLog2
-rw-r--r--src/fileio.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ac72a14a326..819dbe00ae8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
2010-01-28 Chong Yidong <cyd@stupidchicken.com>
+ * fileio.c (Frename_file): Fix last change (Bug#5487).
+
* m/mips.h: Remove DATA_START. Suggested by Dan Nicolaescu.
* m/alpha.h: Don't define DATA_START on NetBSD (Bug#4629).
diff --git a/src/fileio.c b/src/fileio.c
index 36eaf7db533..72f695acb68 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2289,7 +2289,7 @@ This is what happens in interactive use with M-x. */)
NILP (ok_if_already_exists) ? Qnil : Qt);
else
#endif
- if (Ffile_directory_p (file))
+ if (!NILP (Ffile_directory_p (file)))
call4 (Qcopy_directory, file, newname, Qt, Qnil);
else
/* We have already prompted if it was an integer, so don't
@@ -2300,7 +2300,7 @@ This is what happens in interactive use with M-x. */)
count = SPECPDL_INDEX ();
specbind (Qdelete_by_moving_to_trash, Qnil);
- if (Ffile_directory_p (file))
+ if (!NILP (Ffile_directory_p (file)))
call2 (Qdelete_directory, file, Qt);
else
Fdelete_file (file);