Mercurial > emacs
comparison src/fileio.c @ 107060:56607edb3cea
* fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 30 Jan 2010 23:49:28 -0500 |
parents | 6e7738cc419f |
children | fddcde0a4c70 |
comparison
equal
deleted
inserted
replaced
107059:4ab5994c2846 | 107060:56607edb3cea |
---|---|
2298 NILP (ok_if_already_exists) ? Qnil : Qt, | 2298 NILP (ok_if_already_exists) ? Qnil : Qt, |
2299 Qt, Qt); | 2299 Qt, Qt); |
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); |
2307 unbind_to (count, Qnil); | 2312 unbind_to (count, Qnil); |
2308 } | 2313 } |