diff options
| author | Michael Albinus | 2017-12-28 11:26:28 +0100 |
|---|---|---|
| committer | Michael Albinus | 2017-12-28 11:26:28 +0100 |
| commit | 57c291f2c7a2685fe0c4eeae961bfad5b9fdfee5 (patch) | |
| tree | f04add63e1db0eed6b69c65a7dfdaa1e7ed94b20 | |
| parent | b19df8ae78cdebe76512a70f76ec68677de41c11 (diff) | |
| download | emacs-57c291f2c7a2685fe0c4eeae961bfad5b9fdfee5.tar.gz emacs-57c291f2c7a2685fe0c4eeae961bfad5b9fdfee5.zip | |
Fix Bug#29874
* lisp/net/ange-ftp.el (ange-ftp-file-accessible-directory-p)
(ange-ftp-real-file-accessible-directory-p): New defuns.
(ange-ftp-nslookup-host, ange-ftp-start-process):
Use `ange-ftp-real-file-accessible-directory-p'.
(file-accessible-directory-p): Put `ange-ftp' property. (Bug#29874)
| -rw-r--r-- | lisp/net/ange-ftp.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index cf65e10e510..57e4de9cb8d 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1873,7 +1873,7 @@ been queued with no result. CONT will still be called, however." | |||
| 1873 | (interactive "sHost: ") | 1873 | (interactive "sHost: ") |
| 1874 | (if ange-ftp-nslookup-program | 1874 | (if ange-ftp-nslookup-program |
| 1875 | (let ((default-directory | 1875 | (let ((default-directory |
| 1876 | (if (file-accessible-directory-p default-directory) | 1876 | (if (ange-ftp-real-file-accessible-directory-p default-directory) |
| 1877 | default-directory | 1877 | default-directory |
| 1878 | exec-directory)) | 1878 | exec-directory)) |
| 1879 | ;; It would be nice to make process-connection-type nil, | 1879 | ;; It would be nice to make process-connection-type nil, |
| @@ -1916,7 +1916,7 @@ on the gateway machine to do the FTP instead." | |||
| 1916 | ;; default-directory. | 1916 | ;; default-directory. |
| 1917 | (file-name-handler-alist) | 1917 | (file-name-handler-alist) |
| 1918 | (default-directory | 1918 | (default-directory |
| 1919 | (if (file-accessible-directory-p default-directory) | 1919 | (if (ange-ftp-real-file-accessible-directory-p default-directory) |
| 1920 | default-directory | 1920 | default-directory |
| 1921 | exec-directory)) | 1921 | exec-directory)) |
| 1922 | proc) | 1922 | proc) |
| @@ -3404,6 +3404,10 @@ system TYPE.") | |||
| 3404 | file-ent)) | 3404 | file-ent)) |
| 3405 | (ange-ftp-real-file-directory-p name))) | 3405 | (ange-ftp-real-file-directory-p name))) |
| 3406 | 3406 | ||
| 3407 | (defun ange-ftp-file-accessible-directory-p (name) | ||
| 3408 | (and (file-directory-p name) | ||
| 3409 | (file-readable-p name))) | ||
| 3410 | |||
| 3407 | (defun ange-ftp-directory-files (directory &optional full match | 3411 | (defun ange-ftp-directory-files (directory &optional full match |
| 3408 | &rest v19-args) | 3412 | &rest v19-args) |
| 3409 | (setq directory (expand-file-name directory)) | 3413 | (setq directory (expand-file-name directory)) |
| @@ -4385,6 +4389,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4385 | (put 'directory-files-and-attributes 'ange-ftp | 4389 | (put 'directory-files-and-attributes 'ange-ftp |
| 4386 | 'ange-ftp-directory-files-and-attributes) | 4390 | 'ange-ftp-directory-files-and-attributes) |
| 4387 | (put 'file-directory-p 'ange-ftp 'ange-ftp-file-directory-p) | 4391 | (put 'file-directory-p 'ange-ftp 'ange-ftp-file-directory-p) |
| 4392 | (put 'file-accessible-directory-p 'ange-ftp | ||
| 4393 | 'ange-ftp-file-accessible-directory-p) | ||
| 4388 | (put 'file-writable-p 'ange-ftp 'ange-ftp-file-writable-p) | 4394 | (put 'file-writable-p 'ange-ftp 'ange-ftp-file-writable-p) |
| 4389 | (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) | 4395 | (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) |
| 4390 | (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) | 4396 | (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) |
| @@ -4469,6 +4475,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4469 | (ange-ftp-run-real-handler 'directory-files-and-attributes args)) | 4475 | (ange-ftp-run-real-handler 'directory-files-and-attributes args)) |
| 4470 | (defun ange-ftp-real-file-directory-p (&rest args) | 4476 | (defun ange-ftp-real-file-directory-p (&rest args) |
| 4471 | (ange-ftp-run-real-handler 'file-directory-p args)) | 4477 | (ange-ftp-run-real-handler 'file-directory-p args)) |
| 4478 | (defun ange-ftp-real-file-accessible-directory-p (&rest args) | ||
| 4479 | (ange-ftp-run-real-handler 'file-accessible-directory-p args)) | ||
| 4472 | (defun ange-ftp-real-file-writable-p (&rest args) | 4480 | (defun ange-ftp-real-file-writable-p (&rest args) |
| 4473 | (ange-ftp-run-real-handler 'file-writable-p args)) | 4481 | (ange-ftp-run-real-handler 'file-writable-p args)) |
| 4474 | (defun ange-ftp-real-file-readable-p (&rest args) | 4482 | (defun ange-ftp-real-file-readable-p (&rest args) |