summaryrefslogtreecommitdiff
path: root/lisp/net/tramp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r--lisp/net/tramp.el33
1 files changed, 13 insertions, 20 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7b34a748822..690dd99ae55 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2001,7 +2001,7 @@ the resulting error message."
(unless (eq error-symbol 'void-variable)
(tramp-error
(car tramp-current-connection) error-symbol
- "%s" (mapconcat (lambda (x) (format "%s" x)) data " "))))
+ (mapconcat (lambda (x) (format "%s" x)) data " "))))
(put #'tramp-signal-hook-function 'tramp-suppress-trace t)
@@ -3058,9 +3058,9 @@ User is always nil."
(defun tramp-handle-access-file (filename string)
"Like `access-file' for Tramp files."
(unless (file-readable-p (file-truename filename))
- (tramp-error
- (tramp-dissect-file-name filename) tramp-file-missing
- "%s: No such file or directory %s" string filename)))
+ (tramp-compat-file-missing
+ (tramp-dissect-file-name filename)
+ (format "%s: %s" string filename))))
(defun tramp-handle-add-name-to-file
(filename newname &optional ok-if-already-exists)
@@ -3094,9 +3094,7 @@ User is always nil."
;; `copy-directory' creates NEWNAME before running this check. So
;; we do it ourselves.
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
;; We must do it file-wise.
(tramp-run-real-handler
'copy-directory
@@ -3117,9 +3115,7 @@ User is always nil."
(defun tramp-handle-directory-files (directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(setq directory (file-name-as-directory (expand-file-name directory)))
(let ((temp (nreverse (file-name-all-completions "" directory)))
@@ -3216,9 +3212,7 @@ User is always nil."
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "Cannot make local copy of non-existing file `%s'" filename))
+ (tramp-compat-file-missing v filename))
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(copy-file filename tmpfile 'ok-if-already-exists 'keep-time)
tmpfile)))
@@ -3428,8 +3422,10 @@ User is always nil."
(if (stringp symlink-target)
(if (file-remote-p symlink-target)
(tramp-compat-file-name-quote symlink-target 'top)
- (expand-file-name
- symlink-target (file-name-directory v2-localname)))
+ (tramp-drop-volume-letter
+ (expand-file-name
+ symlink-target
+ (file-name-directory v2-localname))))
v2-localname)
'nohop)))
(when (>= numchase numchase-limit)
@@ -3511,9 +3507,7 @@ User is always nil."
(with-parsed-tramp-file-name filename nil
(unwind-protect
(if (not (file-exists-p filename))
- (tramp-error
- v tramp-file-missing
- "File `%s' not found on remote host" filename)
+ (tramp-compat-file-missing v filename)
(with-tramp-progress-reporter
v 3 (format-message "Inserting `%s'" filename)
@@ -3636,8 +3630,7 @@ User is always nil."
v 'file-error
"File `%s' does not include a `.el' or `.elc' suffix" file)))
(unless (or noerror (file-exists-p file))
- (tramp-error
- v tramp-file-missing "Cannot load nonexistent file `%s'" file))
+ (tramp-compat-file-missing v file))
(if (not (file-exists-p file))
nil
(let ((signal-hook-function (unless noerror signal-hook-function))