summaryrefslogtreecommitdiff
path: root/src/fontset.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-08-02 01:53:46 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-08-02 01:59:32 -0700
commit1f9f514e7c2ba41b0954d0141f99652f6a53a107 (patch)
tree37d6a253a4db4b6ff2a46e9a7ac512cbe1938c71 /src/fontset.c
parent5656492d04aa1a82747ff167d8063bbd7950597e (diff)
downloademacs-1f9f514e7c2ba41b0954d0141f99652f6a53a107.tar.gz
emacs-1f9f514e7c2ba41b0954d0141f99652f6a53a107.tar.bz2
emacs-1f9f514e7c2ba41b0954d0141f99652f6a53a107.zip
When renaming a file, ask only if EEXIST or ENOSYS
* src/fileio.c (Frename_file): Avoid calling Ffile_directory_p more than once on FILE. Use renameat_noreplace, so that we can ask the user (and unlink and retry) only if this fails with errno == EEXIST or ENOSYS. This avoids the need to ask the user for permission to do an operation that will fail anyway. Simplify computation of ok_if_already_exists for subsidiary functions. * src/filelock.c (rename_lock_file): Prefer renameat_noreplace if it works, as this avoids the need to link and unlink. * src/lisp.h (renameat_noreplace): New decl. * src/sysdep.c [HAVE_LINUX_FS_H]: Include linux/fs.h and sys/syscall.h. (renameat_noreplace): New function.
Diffstat (limited to 'src/fontset.c')
0 files changed, 0 insertions, 0 deletions