diff options
| author | Chong Yidong | 2010-01-30 23:49:28 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-01-30 23:49:28 -0500 |
| commit | 8fab23622f08c0ecc404b1c12ef9834eda4a7bb3 (patch) | |
| tree | d67e1947cc529d5d7994057054f0d6c19fdae83a /src/fileio.c | |
| parent | 5e4fe3f9cf2e351d9634df46176ed2de3239c1b7 (diff) | |
| download | emacs-8fab23622f08c0ecc404b1c12ef9834eda4a7bb3.tar.gz emacs-8fab23622f08c0ecc404b1c12ef9834eda4a7bb3.zip | |
* fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496).
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 72f695acb68..50f8cb14bfb 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2300,7 +2300,12 @@ This is what happens in interactive use with M-x. */) | |||
| 2300 | 2300 | ||
| 2301 | count = SPECPDL_INDEX (); | 2301 | count = SPECPDL_INDEX (); |
| 2302 | specbind (Qdelete_by_moving_to_trash, Qnil); | 2302 | specbind (Qdelete_by_moving_to_trash, Qnil); |
| 2303 | if (!NILP (Ffile_directory_p (file))) | 2303 | |
| 2304 | if (!NILP (Ffile_directory_p (file)) | ||
| 2305 | #ifdef S_IFLNK | ||
| 2306 | && NILP (symlink_target) | ||
| 2307 | #endif | ||
| 2308 | ) | ||
| 2304 | call2 (Qdelete_directory, file, Qt); | 2309 | call2 (Qdelete_directory, file, Qt); |
| 2305 | else | 2310 | else |
| 2306 | Fdelete_file (file); | 2311 | Fdelete_file (file); |