1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
emacs/test/src
Paul Eggert e8001d4c27 Do not munge contents of local symbolic links
This lets Emacs deal with arbitrary local symlinks without
mishandling their contents (Bug#28156).  For example,
(progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x"))
now consistently creates a symbolic link from '/tmp/x' to '~'.
Formerly, it did that only if the working directory was on the
same filesystem as /tmp; otherwise, it expanded the '~' to
the user's home directory.
* lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p
instead of rolling our own code.
* lisp/files.el (files--name-absolute-system-p): New function.
(file-truename, file-chase-links): Use it to avoid mishandling
symlink contents that begin with ~.
(copy-directory, move-file-to-trash):
Use concat rather than expand-file-name, to avoid mishandling
symlink contents that begin with ~.
* src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the
target unless interactive.  Strip leading "/:" if interactive.
(emacs_readlinkat): Do not prepend "/:" to the link target if
it starts with "/" and contains ":" before NUL.
* test/src/fileio-tests.el (try-link): Rename from try-char,
and accept a string instead of a char.  All uses changed.
(fileio-tests--symlink-failure): Also test leading ~, and "/:",
to test the new behavior.
2017-08-26 18:36:38 -07:00
..
regex-resources
alloc-tests.el Deprecate copy-record in favor of copy-sequence 2017-04-07 18:54:40 -07:00
buffer-tests.el Fix a bug in 'generate-new-buffer-name' 2017-08-05 12:52:55 +03:00
callproc-tests.el
casefiddle-tests.el Implement special sigma casing rule (bug#24603) 2017-04-06 20:54:58 +02:00
charset-tests.el Compare and round more carefully 2017-03-04 23:18:39 -08:00
chartab-tests.el
cmds-tests.el
coding-tests.el
data-tests.el Quieten compilation of some test files 2017-05-31 21:17:28 -04:00
decompress-tests.el
doc-tests.el
editfns-tests.el Add command to replace buffer contents 2017-06-17 15:40:58 +02:00
emacs-module-tests.el Fix crashing emacs-module tests on MS-Windows 2017-08-09 20:15:46 +03:00
eval-tests.el Fix some crashes on self-modifying Elisp code 2017-08-06 16:58:35 -07:00
fileio-tests.el Do not munge contents of local symbolic links 2017-08-26 18:36:38 -07:00
floatfns-tests.el ffloor etc. now accept only floats 2017-03-05 13:31:33 -08:00
fns-tests.el Add an optional testfn parameter to assoc 2017-07-11 10:07:16 +02:00
font-tests.el
inotify-tests.el Some inotify cleanup 2017-03-30 11:08:42 -07:00
keymap-tests.el
lread-tests.el Signal error for symbol names with strange quotes (Bug#2967) 2017-07-22 08:47:31 -04:00
marker-tests.el
minibuf-tests.el
print-tests.el
process-tests.el
regex-tests.el Quieten compilation of some test files 2017-05-31 21:17:28 -04:00
syntax-tests.el Fix comment detection on open parens 2017-01-23 19:28:30 -05:00
textprop-tests.el
thread-tests.el Rudimentary error handling for non-main threads 2017-01-18 18:00:16 +02:00
undo-tests.el Add test for the fix in the parent commit 2017-06-17 03:55:49 +03:00
xml-tests.el