[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 130c1b8: Fix Bug#30533
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 130c1b8: Fix Bug#30533 |
Date: |
Thu, 22 Feb 2018 05:49:17 -0500 (EST) |
branch: master
commit 130c1b8e0e94e7f309db54e440a73cb15a2c8ab6
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix Bug#30533
* lisp/net/ange-ftp.el (ange-ftp-file-regular-p)
(ange-ftp-real-file-regular-p): New defuns. (Bug#30533)
---
lisp/net/ange-ftp.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index f5a5474..b1e0bf2 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3373,6 +3373,13 @@ system TYPE.")
(file-error nil))
(ange-ftp-real-file-symlink-p file)))
+(defun ange-ftp-file-regular-p (file)
+ ;; Reuse Tramp's implementation.
+ (if (ange-ftp-ftp-name file)
+ (and (file-exists-p file)
+ (eq ?- (aref (file-attribute-modes (file-attributes file)) 0)))
+ (ange-ftp-real-file-regular-p file)))
+
(defun ange-ftp-file-exists-p (name)
(setq name (expand-file-name name))
(if (ange-ftp-ftp-name name)
@@ -4395,6 +4402,7 @@ NEWNAME should be the name to give the new compressed or
uncompressed file.")
(put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p)
(put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p)
(put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p)
+(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p)
(put 'delete-file 'ange-ftp 'ange-ftp-delete-file)
(put 'verify-visited-file-modtime 'ange-ftp
'ange-ftp-verify-visited-file-modtime)
@@ -4485,6 +4493,8 @@ NEWNAME should be the name to give the new compressed or
uncompressed file.")
(ange-ftp-run-real-handler 'file-executable-p args))
(defun ange-ftp-real-file-symlink-p (&rest args)
(ange-ftp-run-real-handler 'file-symlink-p args))
+(defun ange-ftp-real-file-regular-p (&rest args)
+ (ange-ftp-run-real-handler 'file-regular-p args))
(defun ange-ftp-real-delete-file (&rest args)
(ange-ftp-run-real-handler 'delete-file args))
(defun ange-ftp-real-verify-visited-file-modtime (&rest args)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 130c1b8: Fix Bug#30533,
Michael Albinus <=