[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108526: * net/tramp-compat.el (tramp
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108526: * net/tramp-compat.el (tramp-compat-temporary-file-directory): Avoid infloop. |
Date: |
Fri, 08 Jun 2012 15:27:06 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108526
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-08 15:27:06 +0200
message:
* net/tramp-compat.el (tramp-compat-temporary-file-directory): Avoid infloop.
modified:
lisp/ChangeLog
lisp/net/tramp-compat.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-08 13:18:26 +0000
+++ b/lisp/ChangeLog 2012-06-08 13:27:06 +0000
@@ -1,3 +1,8 @@
+2012-06-08 Michael Albinus <address@hidden>
+
+ * net/tramp-compat.el (tramp-compat-temporary-file-directory):
+ Avoid infloop.
+
2012-06-08 Stefan Monnier <address@hidden>
* startup.el (argv, argi): Make lexically scoped.
=== modified file 'lisp/net/tramp-compat.el'
--- a/lisp/net/tramp-compat.el 2012-06-06 13:32:36 +0000
+++ b/lisp/net/tramp-compat.el 2012-06-08 13:27:06 +0000
@@ -204,21 +204,23 @@
"Return name of directory for temporary files (compat function).
For Emacs, this is the variable `temporary-file-directory', for XEmacs
this is the function `temp-directory'."
- (cond
- ((and (boundp 'temporary-file-directory)
- (not (file-remote-p (symbol-value 'temporary-file-directory))))
- (symbol-value 'temporary-file-directory))
- ((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory))
- ((let ((d (getenv "TEMP"))) (and d (file-directory-p d)))
- (file-name-as-directory (getenv "TEMP")))
- ((let ((d (getenv "TMP"))) (and d (file-directory-p d)))
- (file-name-as-directory (getenv "TMP")))
- ((let ((d (getenv "TMPDIR"))) (and d (file-directory-p d)))
- (file-name-as-directory (getenv "TMPDIR")))
- ((file-exists-p "c:/temp") (file-name-as-directory "c:/temp"))
- (t (message (concat "Neither `temporary-file-directory' nor "
- "`temp-directory' is defined -- using /tmp."))
- (file-name-as-directory "/tmp"))))
+ (let (file-name-handler-alist)
+ (cond
+ ;; We must return a local directory. If it is remote, we could
+ ;; run into an infloop.
+ ((boundp 'temporary-file-directory)
+ (eval (car (get 'temporary-file-directory 'standard-value))))
+ ((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory))
+ ((let ((d (getenv "TEMP"))) (and d (file-directory-p d)))
+ (file-name-as-directory (getenv "TEMP")))
+ ((let ((d (getenv "TMP"))) (and d (file-directory-p d)))
+ (file-name-as-directory (getenv "TMP")))
+ ((let ((d (getenv "TMPDIR"))) (and d (file-directory-p d)))
+ (file-name-as-directory (getenv "TMPDIR")))
+ ((file-exists-p "c:/temp") (file-name-as-directory "c:/temp"))
+ (t (message (concat "Neither `temporary-file-directory' nor "
+ "`temp-directory' is defined -- using /tmp."))
+ (file-name-as-directory "/tmp")))))
;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own
;; implementation with `make-temp-name', creating the temporary file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108526: * net/tramp-compat.el (tramp-compat-temporary-file-directory): Avoid infloop.,
Michael Albinus <=