Mercurial > emacs
comparison src/fileio.c @ 107037:6e7738cc419f
* fileio.c (Frename_file): Fix last change (Bug#5487).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 28 Jan 2010 12:47:05 -0500 |
parents | 8b0707b50290 |
children | 56607edb3cea |
comparison
equal
deleted
inserted
replaced
107036:467d1fce4215 | 107037:6e7738cc419f |
---|---|
2287 if (! NILP (symlink_target)) | 2287 if (! NILP (symlink_target)) |
2288 Fmake_symbolic_link (symlink_target, newname, | 2288 Fmake_symbolic_link (symlink_target, newname, |
2289 NILP (ok_if_already_exists) ? Qnil : Qt); | 2289 NILP (ok_if_already_exists) ? Qnil : Qt); |
2290 else | 2290 else |
2291 #endif | 2291 #endif |
2292 if (Ffile_directory_p (file)) | 2292 if (!NILP (Ffile_directory_p (file))) |
2293 call4 (Qcopy_directory, file, newname, Qt, Qnil); | 2293 call4 (Qcopy_directory, file, newname, Qt, Qnil); |
2294 else | 2294 else |
2295 /* We have already prompted if it was an integer, so don't | 2295 /* We have already prompted if it was an integer, so don't |
2296 have copy-file prompt again. */ | 2296 have copy-file prompt again. */ |
2297 Fcopy_file (file, newname, | 2297 Fcopy_file (file, newname, |
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 (Ffile_directory_p (file)) | 2303 if (!NILP (Ffile_directory_p (file))) |
2304 call2 (Qdelete_directory, file, Qt); | 2304 call2 (Qdelete_directory, file, Qt); |
2305 else | 2305 else |
2306 Fdelete_file (file); | 2306 Fdelete_file (file); |
2307 unbind_to (count, Qnil); | 2307 unbind_to (count, Qnil); |
2308 } | 2308 } |