diff options
| author | Paul Eggert | 2019-07-26 09:46:18 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-26 09:48:57 -0700 |
| commit | e3575ee4b2fc8e74238dcc710c569885e1eef937 (patch) | |
| tree | b9dae51bfd36c335138dc9ece34b1775e6eb591b /src | |
| parent | 40b067522fe122668350777451bb5b08e666842b (diff) | |
| download | emacs-e3575ee4b2fc8e74238dcc710c569885e1eef937.tar.gz emacs-e3575ee4b2fc8e74238dcc710c569885e1eef937.zip | |
Fix recently-introduced file-name-absolute-p typo
Fix a bug introduced in 2019-07-24T21:28:13!eggert@cs.ucla.edu.
* src/fileio.c (file_name_absolute_p):
~/foo is also absolute (Bug#36809).
* test/src/fileio-tests.el (fileio-tests--file-name-absolute-p):
Rename from fileio-tests--no-such-user and add more tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index d1a7f39ac95..968a55e5956 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2690,7 +2690,8 @@ file_name_absolute_p (char const *filename) | |||
| 2690 | { | 2690 | { |
| 2691 | return (IS_ABSOLUTE_FILE_NAME (filename) | 2691 | return (IS_ABSOLUTE_FILE_NAME (filename) |
| 2692 | || (filename[0] == '~' | 2692 | || (filename[0] == '~' |
| 2693 | && (!filename[1] || user_homedir (&filename[1])))); | 2693 | && (!filename[1] || IS_DIRECTORY_SEP (filename[1]) |
| 2694 | || user_homedir (&filename[1])))); | ||
| 2694 | } | 2695 | } |
| 2695 | 2696 | ||
| 2696 | DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, | 2697 | DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, |