aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/net/tramp-adb.el7
-rw-r--r--lisp/net/tramp-compat.el14
-rw-r--r--lisp/net/tramp-gvfs.el2
-rw-r--r--lisp/net/tramp-sh.el134
-rw-r--r--lisp/net/tramp.el22
6 files changed, 114 insertions, 86 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9c3be36984b..7f7757e750e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12013-04-22 Michael Albinus <michael.albinus@gmx.de>
2
3 Fix pack/unpack coding. Reported by David Smith <davidsmith@acm.org>.
4
5 * net/tramp-compat.el (tramp-compat-call-process): Move function ...
6 * net/tramp.el (tramp-call-process): ... here
7 (tramp-set-completion-function, tramp-parse-putty):
8 * net/tramp-adb.el (tramp-adb-execute-adb-command):
9 * net/tramp-gvfs.el (tramp-gvfs-send-command):
10 * net/tramp-sh.el (tramp-sh-handle-set-file-times)
11 (tramp-set-file-uid-gid, tramp-sh-handle-write-region)
12 (tramp-call-local-coding-command): Use `tramp-call-process'
13 instead of `tramp-compat-call-process'.
14
15 * net/tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst.
16 (tramp-local-coding-commands, tramp-remote-coding-commands): Use them.
17 (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
18 (tramp-find-inline-compress):Improve traces.
19 (tramp-maybe-send-script): Check for Perl binary.
20 (tramp-get-inline-coding): Do not redirect STDOUT for local decoding.
21
12013-04-22 Daiki Ueno <ueno@gnu.org> 222013-04-22 Daiki Ueno <ueno@gnu.org>
2 23
3 * epg.el (epg-context-pinentry-mode): New function. 24 * epg.el (epg-context-pinentry-mode): New function.
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index a71df54db58..613b2067955 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -982,11 +982,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
982 (setq args (append (list "-s" (tramp-file-name-host vec)) args))) 982 (setq args (append (list "-s" (tramp-file-name-host vec)) args)))
983 (with-temp-buffer 983 (with-temp-buffer
984 (prog1 984 (prog1
985 (unless (zerop (apply 'call-process tramp-adb-program nil t nil args)) 985 (unless
986 (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
986 (buffer-string)) 987 (buffer-string))
987 (tramp-message 988 (tramp-message vec 6 "%s" (buffer-string)))))
988 vec 6 "%s %s\n%s"
989 tramp-adb-program (mapconcat 'identity args " ") (buffer-string)))))
990 989
991(defun tramp-adb-find-test-command (vec) 990(defun tramp-adb-find-test-command (vec)
992 "Checks, whether the ash has a builtin \"test\" command. 991 "Checks, whether the ash has a builtin \"test\" command.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index ed61fbcfa76..d4115352b34 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -438,20 +438,6 @@ This is, the first, empty, element is omitted. In XEmacs, the first
438element is not omitted." 438element is not omitted."
439 (delete "" (split-string string pattern))) 439 (delete "" (split-string string pattern)))
440 440
441(defun tramp-compat-call-process
442 (program &optional infile destination display &rest args)
443 "Calls `call-process' on the local host.
444This is needed because for some Emacs flavors Tramp has
445defadvised `call-process' to behave like `process-file'. The
446Lisp error raised when PROGRAM is nil is trapped also, returning 1."
447 (let ((default-directory
448 (if (file-remote-p default-directory)
449 (tramp-compat-temporary-file-directory)
450 default-directory)))
451 (if (executable-find program)
452 (apply 'call-process program infile destination display args)
453 1)))
454
455(defun tramp-compat-process-running-p (process-name) 441(defun tramp-compat-process-running-p (process-name)
456 "Returns `t' if system process PROCESS-NAME is running for `user-login-name'." 442 "Returns `t' if system process PROCESS-NAME is running for `user-login-name'."
457 (when (stringp process-name) 443 (when (stringp process-name)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 6f066f56a2b..7c3b393873c 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1572,7 +1572,7 @@ COMMAND is usually a command from the gvfs-* utilities.
1572 (tramp-gvfs-maybe-open-connection vec) 1572 (tramp-gvfs-maybe-open-connection vec)
1573 (erase-buffer) 1573 (erase-buffer)
1574 (tramp-message vec 6 "%s %s" command (mapconcat 'identity args " ")) 1574 (tramp-message vec 6 "%s %s" command (mapconcat 'identity args " "))
1575 (setq result (apply 'tramp-compat-call-process command nil t nil args)) 1575 (setq result (apply 'tramp-call-process command nil t nil args))
1576 (tramp-message vec 6 "\n%s" (buffer-string)) 1576 (tramp-message vec 6 "\n%s" (buffer-string))
1577 (zerop result)))) 1577 (zerop result))))
1578 1578
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f28df1ce160..e45c2cf8511 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -767,6 +767,16 @@ while (my $data = <STDIN>) {
767Escape sequence %s is replaced with name of Perl binary. 767Escape sequence %s is replaced with name of Perl binary.
768This string is passed to `format', so percent characters need to be doubled.") 768This string is passed to `format', so percent characters need to be doubled.")
769 769
770(defconst tramp-perl-pack
771 "%s -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)'"
772 "Perl program to use for encoding a file.
773Escape sequence %s is replaced with name of Perl binary.")
774
775(defconst tramp-perl-unpack
776 "%s -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'"
777 "Perl program to use for decoding a file.
778Escape sequence %s is replaced with name of Perl binary.")
779
770(defconst tramp-vc-registered-read-file-names 780(defconst tramp-vc-registered-read-file-names
771 "echo \"(\" 781 "echo \"(\"
772while read file; do 782while read file; do
@@ -1309,7 +1319,7 @@ of."
1309 ;; without `set-file-times', this function is an alias for this. 1319 ;; without `set-file-times', this function is an alias for this.
1310 ;; We are local, so we don't need the UTC settings. 1320 ;; We are local, so we don't need the UTC settings.
1311 (zerop 1321 (zerop
1312 (tramp-compat-call-process 1322 (tramp-call-process
1313 "touch" nil nil nil "-t" 1323 "touch" nil nil nil "-t"
1314 (format-time-string "%Y%m%d%H%M.%S" time) 1324 (format-time-string "%Y%m%d%H%M.%S" time)
1315 (tramp-shell-quote-argument filename))))) 1325 (tramp-shell-quote-argument filename)))))
@@ -1343,7 +1353,7 @@ be non-negative integers."
1343 ;; `set-file-uid-gid'. On W32 "chown" might not work. 1353 ;; `set-file-uid-gid'. On W32 "chown" might not work.
1344 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer))) 1354 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
1345 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer)))) 1355 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
1346 (tramp-compat-call-process 1356 (tramp-call-process
1347 "chown" nil nil nil 1357 "chown" nil nil nil
1348 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))) 1358 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
1349 1359
@@ -2891,40 +2901,39 @@ the result will be a local, non-Tramp, filename."
2891 (rem-enc 2901 (rem-enc
2892 (save-excursion 2902 (save-excursion
2893 (with-tramp-progress-reporter 2903 (with-tramp-progress-reporter
2894 v 3 (format "Encoding remote file %s" filename) 2904 v 3
2905 (format "Encoding remote file `%s' with `%s'" filename rem-enc)
2895 (tramp-barf-unless-okay 2906 (tramp-barf-unless-okay
2896 v (format rem-enc (tramp-shell-quote-argument localname)) 2907 v (format rem-enc (tramp-shell-quote-argument localname))
2897 "Encoding remote file failed")) 2908 "Encoding remote file failed"))
2898 2909
2899 (if (functionp loc-dec) 2910 (with-tramp-progress-reporter
2900 ;; If local decoding is a function, we call it. We 2911 v 3 (format "Decoding local file `%s' with `%s'"
2901 ;; must disable multibyte, because 2912 tmpfile loc-dec)
2902 ;; `uudecode-decode-region' doesn't handle it 2913 (if (functionp loc-dec)
2903 ;; correctly. 2914 ;; If local decoding is a function, we call it.
2904 (with-temp-buffer 2915 ;; We must disable multibyte, because
2905 (set-buffer-multibyte nil) 2916 ;; `uudecode-decode-region' doesn't handle it
2906 (insert-buffer-substring (tramp-get-buffer v)) 2917 ;; correctly.
2907 (with-tramp-progress-reporter 2918 (with-temp-buffer
2908 v 3 (format "Decoding remote file %s with function %s" 2919 (set-buffer-multibyte nil)
2909 filename loc-dec) 2920 (insert-buffer-substring (tramp-get-buffer v))
2910 (funcall loc-dec (point-min) (point-max)) 2921 (funcall loc-dec (point-min) (point-max))
2911 ;; Unset `file-name-handler-alist'. Otherwise, 2922 ;; Unset `file-name-handler-alist'. Otherwise,
2912 ;; epa-file gets confused. 2923 ;; epa-file gets confused.
2913 (let (file-name-handler-alist 2924 (let (file-name-handler-alist
2914 (coding-system-for-write 'binary)) 2925 (coding-system-for-write 'binary))
2915 (write-region (point-min) (point-max) tmpfile)))) 2926 (write-region (point-min) (point-max) tmpfile)))
2916 2927
2917 ;; If tramp-decoding-function is not defined for this 2928 ;; If tramp-decoding-function is not defined for this
2918 ;; method, we invoke tramp-decoding-command instead. 2929 ;; method, we invoke tramp-decoding-command instead.
2919 (let ((tmpfile2 (tramp-compat-make-temp-file filename))) 2930 (let ((tmpfile2 (tramp-compat-make-temp-file filename)))
2920 ;; Unset `file-name-handler-alist'. Otherwise, 2931 ;; Unset `file-name-handler-alist'. Otherwise,
2921 ;; epa-file gets confused. 2932 ;; epa-file gets confused.
2922 (let (file-name-handler-alist 2933 (let (file-name-handler-alist
2923 (coding-system-for-write 'binary)) 2934 (coding-system-for-write 'binary))
2924 (write-region (point-min) (point-max) tmpfile2)) 2935 (with-current-buffer (tramp-get-buffer v)
2925 (with-tramp-progress-reporter 2936 (write-region (point-min) (point-max) tmpfile2)))
2926 v 3 (format "Decoding remote file %s with command %s"
2927 filename loc-dec)
2928 (unwind-protect 2937 (unwind-protect
2929 (tramp-call-local-coding-command 2938 (tramp-call-local-coding-command
2930 loc-dec tmpfile2 tmpfile) 2939 loc-dec tmpfile2 tmpfile)
@@ -3149,28 +3158,25 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3149 (with-temp-buffer 3158 (with-temp-buffer
3150 (set-buffer-multibyte nil) 3159 (set-buffer-multibyte nil)
3151 ;; Use encoding function or command. 3160 ;; Use encoding function or command.
3152 (if (functionp loc-enc) 3161 (with-tramp-progress-reporter
3153 (with-tramp-progress-reporter 3162 v 3 (format "Encoding local file `%s' using `%s'"
3154 v 3 (format "Encoding region using function `%s'" 3163 tmpfile loc-enc)
3155 loc-enc) 3164 (if (functionp loc-enc)
3156 (let ((coding-system-for-read 'binary)) 3165 ;; The following `let' is a workaround for
3157 (insert-file-contents-literally tmpfile)) 3166 ;; the base64.el that comes with pgnus-0.84.
3158 ;; The following `let' is a workaround for the 3167 ;; If both of the following conditions are
3159 ;; base64.el that comes with pgnus-0.84. If
3160 ;; both of the following conditions are
3161 ;; satisfied, it tries to write to a local 3168 ;; satisfied, it tries to write to a local
3162 ;; file in default-directory, but at this 3169 ;; file in default-directory, but at this
3163 ;; point, default-directory is remote. 3170 ;; point, default-directory is remote.
3164 ;; (`call-process-region' can't write to 3171 ;; (`call-process-region' can't write to
3165 ;; remote files, it seems.) The file in 3172 ;; remote files, it seems.) The file in
3166 ;; question is a tmp file anyway. 3173 ;; question is a tmp file anyway.
3167 (let ((default-directory 3174 (let ((coding-system-for-read 'binary)
3175 (default-directory
3168 (tramp-compat-temporary-file-directory))) 3176 (tramp-compat-temporary-file-directory)))
3169 (funcall loc-enc (point-min) (point-max)))) 3177 (insert-file-contents-literally tmpfile)
3178 (funcall loc-enc (point-min) (point-max)))
3170 3179
3171 (with-tramp-progress-reporter
3172 v 3 (format "Encoding region using command `%s'"
3173 loc-enc)
3174 (unless (zerop (tramp-call-local-coding-command 3180 (unless (zerop (tramp-call-local-coding-command
3175 loc-enc tmpfile t)) 3181 loc-enc tmpfile t))
3176 (tramp-error 3182 (tramp-error
@@ -3183,8 +3189,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3183 ;; writes to remote file. Because this happens on 3189 ;; writes to remote file. Because this happens on
3184 ;; the remote host, we cannot use the function. 3190 ;; the remote host, we cannot use the function.
3185 (with-tramp-progress-reporter 3191 (with-tramp-progress-reporter
3186 v 3 3192 v 3 (format "Decoding remote file `%s' using `%s'"
3187 (format "Decoding region into remote file %s" filename) 3193 filename rem-dec)
3188 (goto-char (point-max)) 3194 (goto-char (point-max))
3189 (unless (bolp) (newline)) 3195 (unless (bolp) (newline))
3190 (tramp-send-command 3196 (tramp-send-command
@@ -3204,7 +3210,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3204 (erase-buffer) 3210 (erase-buffer)
3205 (and 3211 (and
3206 ;; cksum runs locally, if possible. 3212 ;; cksum runs locally, if possible.
3207 (zerop (tramp-compat-call-process "cksum" tmpfile t)) 3213 (zerop (tramp-call-process "cksum" tmpfile t))
3208 ;; cksum runs remotely. 3214 ;; cksum runs remotely.
3209 (tramp-send-command-and-check 3215 (tramp-send-command-and-check
3210 v 3216 v
@@ -3382,6 +3388,9 @@ Only send the definition if it has not already been done."
3382 (unless (member name scripts) 3388 (unless (member name scripts)
3383 (with-tramp-progress-reporter vec 5 (format "Sending script `%s'" name) 3389 (with-tramp-progress-reporter vec 5 (format "Sending script `%s'" name)
3384 ;; The script could contain a call of Perl. This is masked with `%s'. 3390 ;; The script could contain a call of Perl. This is masked with `%s'.
3391 (when (and (string-match "%s" script)
3392 (not (tramp-get-remote-perl vec)))
3393 (tramp-error vec 'file-error "No Perl available on remote host"))
3385 (tramp-barf-unless-okay 3394 (tramp-barf-unless-okay
3386 vec 3395 vec
3387 (format "%s () {\n%s\n}" name 3396 (format "%s () {\n%s\n}" name
@@ -3811,11 +3820,6 @@ process to set up. VEC specifies the connection."
3811 (tramp-send-command 3820 (tramp-send-command
3812 vec (format "unset %s" (mapconcat 'identity unset " ")) t)))) 3821 vec (format "unset %s" (mapconcat 'identity unset " ")) t))))
3813 3822
3814;; CCC: We should either implement a Perl version of base64 encoding
3815;; and decoding. Then we just use that in the last item. The other
3816;; alternative is to use the Perl version of UU encoding. But then
3817;; we need a Lisp version of uuencode.
3818;;
3819;; Old text from documentation of tramp-methods: 3823;; Old text from documentation of tramp-methods:
3820;; Using a uuencode/uudecode inline method is discouraged, please use one 3824;; Using a uuencode/uudecode inline method is discouraged, please use one
3821;; of the base64 methods instead since base64 encoding is much more 3825;; of the base64 methods instead since base64 encoding is much more
@@ -3832,11 +3836,9 @@ process to set up. VEC specifies the connection."
3832(autoload 'uudecode-decode-region "uudecode") 3836(autoload 'uudecode-decode-region "uudecode")
3833 3837
3834(defconst tramp-local-coding-commands 3838(defconst tramp-local-coding-commands
3835 '((b64 base64-encode-region base64-decode-region) 3839 `((b64 base64-encode-region base64-decode-region)
3836 (uu tramp-uuencode-region uudecode-decode-region) 3840 (uu tramp-uuencode-region uudecode-decode-region)
3837 (pack 3841 (pack ,(format tramp-perl-pack "perl") ,(format tramp-perl-unpack "perl")))
3838 "perl -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)'"
3839 "perl -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'"))
3840 "List of local coding commands for inline transfer. 3842 "List of local coding commands for inline transfer.
3841Each item is a list that looks like this: 3843Each item is a list that looks like this:
3842 3844
@@ -3871,9 +3873,7 @@ with the encoded or decoded results, respectively.")
3871 (uu "uuencode xxx" "uudecode -o -") 3873 (uu "uuencode xxx" "uudecode -o -")
3872 (uu "uuencode xxx" "uudecode -p") 3874 (uu "uuencode xxx" "uudecode -p")
3873 (uu "uuencode xxx" tramp-uudecode) 3875 (uu "uuencode xxx" tramp-uudecode)
3874 (pack 3876 (pack tramp-perl-pack tramp-perl-unpack))
3875 "perl -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)'"
3876 "perl -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'"))
3877 "List of remote coding commands for inline transfer. 3877 "List of remote coding commands for inline transfer.
3878Each item is a list that looks like this: 3878Each item is a list that looks like this:
3879 3879
@@ -4014,7 +4014,7 @@ INPUT can also be nil which means `/dev/null'.
4014OUTPUT can be a string (which specifies a filename), or t (which 4014OUTPUT can be a string (which specifies a filename), or t (which
4015means standard output and thus the current buffer), or nil (which 4015means standard output and thus the current buffer), or nil (which
4016means discard it)." 4016means discard it)."
4017 (tramp-compat-call-process 4017 (tramp-call-process
4018 tramp-encoding-shell 4018 tramp-encoding-shell
4019 (when (and input (not (string-match "%s" cmd))) input) 4019 (when (and input (not (string-match "%s" cmd))) input)
4020 (if (eq output t) t nil) 4020 (if (eq output t) t nil)
@@ -4022,7 +4022,7 @@ means discard it)."
4022 tramp-encoding-command-switch 4022 tramp-encoding-command-switch
4023 (concat 4023 (concat
4024 (if (string-match "%s" cmd) (format cmd input) cmd) 4024 (if (string-match "%s" cmd) (format cmd input) cmd)
4025 (if (stringp output) (concat "> " output) "")))) 4025 (if (stringp output) (concat " >" output) ""))))
4026 4026
4027(defconst tramp-inline-compress-commands 4027(defconst tramp-inline-compress-commands
4028 '(("gzip" "gzip -d") 4028 '(("gzip" "gzip -d")
@@ -4051,7 +4051,7 @@ Goes through the list `tramp-inline-compress-commands'."
4051 decompress (nth 1 item)) 4051 decompress (nth 1 item))
4052 (tramp-message 4052 (tramp-message
4053 vec 5 4053 vec 5
4054 "Checking local compress command `%s', `%s' for sanity" 4054 "Checking local compress commands `%s', `%s' for sanity"
4055 compress decompress) 4055 compress decompress)
4056 (unless 4056 (unless
4057 (zerop 4057 (zerop
@@ -4067,7 +4067,7 @@ Goes through the list `tramp-inline-compress-commands'."
4067 (throw 'next nil)) 4067 (throw 'next nil))
4068 (tramp-message 4068 (tramp-message
4069 vec 5 4069 vec 5
4070 "Checking remote compress command `%s', `%s' for sanity" 4070 "Checking remote compress commands `%s', `%s' for sanity"
4071 compress decompress) 4071 compress decompress)
4072 (unless (tramp-send-command-and-check 4072 (unless (tramp-send-command-and-check
4073 vec (format "echo %s | %s | %s" magic compress decompress) t) 4073 vec (format "echo %s | %s | %s" magic compress decompress) t)
@@ -4981,10 +4981,12 @@ function cell is returned to be applied on a buffer."
4981 ;; Windows shells need the program file name after 4981 ;; Windows shells need the program file name after
4982 ;; the pipe symbol be quoted if they use forward 4982 ;; the pipe symbol be quoted if they use forward
4983 ;; slashes as directory separators. 4983 ;; slashes as directory separators.
4984 (if (and (string-match "local" prop) 4984 (cond
4985 (memq system-type '(windows-nt))) 4985 ((and (string-match "local" prop)
4986 "(%s | \"%s\" >%%s)" 4986 (memq system-type '(windows-nt)))
4987 "(%s | %s >%%s)") 4987 "(%s | \"%s\")")
4988 ((string-match "local" prop) "(%s | %s)")
4989 (t "(%s | %s >%%s)"))
4988 coding compress)) 4990 coding compress))
4989 (compress 4991 (compress
4990 (format 4992 (format
@@ -4997,7 +4999,9 @@ function cell is returned to be applied on a buffer."
4997 "(%s <%%s | %s)") 4999 "(%s <%%s | %s)")
4998 compress coding)) 5000 compress coding))
4999 ((string-match "decoding" prop) 5001 ((string-match "decoding" prop)
5000 (format "%s >%%s" coding)) 5002 (cond
5003 ((string-match "local" prop) (format "%s" coding))
5004 (t (format "%s >%%s" coding))))
5001 (t 5005 (t
5002 (format "%s <%%s" coding))))))) 5006 (format "%s <%%s" coding)))))))
5003 5007
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7795d9f808c..4ec3a4b7829 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1717,7 +1717,7 @@ Example:
1717 ;; Windows registry. 1717 ;; Windows registry.
1718 (and (memq system-type '(cygwin windows-nt)) 1718 (and (memq system-type '(cygwin windows-nt))
1719 (zerop 1719 (zerop
1720 (tramp-compat-call-process 1720 (tramp-call-process
1721 "reg" nil nil nil "query" (nth 1 (car v))))) 1721 "reg" nil nil nil "query" (nth 1 (car v)))))
1722 ;; Configuration file. 1722 ;; Configuration file.
1723 (file-exists-p (nth 1 (car v))))) 1723 (file-exists-p (nth 1 (car v)))))
@@ -2769,7 +2769,7 @@ User may be nil."
2769User is always nil." 2769User is always nil."
2770 (if (memq system-type '(windows-nt)) 2770 (if (memq system-type '(windows-nt))
2771 (with-temp-buffer 2771 (with-temp-buffer
2772 (when (zerop (tramp-compat-call-process 2772 (when (zerop (tramp-call-process
2773 "reg" nil t nil "query" registry-or-dirname)) 2773 "reg" nil t nil "query" registry-or-dirname))
2774 (goto-char (point-min)) 2774 (goto-char (point-min))
2775 (loop while (not (eobp)) collect 2775 (loop while (not (eobp)) collect
@@ -3897,6 +3897,24 @@ ALIST is of the form ((FROM . TO) ...)."
3897 3897
3898;;; Compatibility functions section: 3898;;; Compatibility functions section:
3899 3899
3900(defun tramp-call-process
3901 (program &optional infile destination display &rest args)
3902 "Calls `call-process' on the local host.
3903This is needed because for some Emacs flavors Tramp has
3904defadvised `call-process' to behave like `process-file'. The
3905Lisp error raised when PROGRAM is nil is trapped also, returning 1.
3906Furthermore, traces are written with verbosity of 6."
3907 (let ((default-directory
3908 (if (file-remote-p default-directory)
3909 (tramp-compat-temporary-file-directory)
3910 default-directory)))
3911 (tramp-message
3912 (vector tramp-current-method tramp-current-user tramp-current-host nil nil)
3913 6 "%s %s %s" program infile args)
3914 (if (executable-find program)
3915 (apply 'call-process program infile destination display args)
3916 1)))
3917
3900;;;###tramp-autoload 3918;;;###tramp-autoload
3901(defun tramp-read-passwd (proc &optional prompt) 3919(defun tramp-read-passwd (proc &optional prompt)
3902 "Read a password from user (compat function). 3920 "Read a password from user (compat function).