diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-04-30 22:19:40 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-04-30 22:19:40 -0400 |
commit | 84716442f070dbf91fd3a1db173e130b78de561a (patch) | |
tree | ffc06855643a2a6a3566bdd48a9f0580f60f1708 /lisp/server.el | |
parent | 07125a915e33a3a5cadea27f3f43647969ebf496 (diff) | |
download | emacs-84716442f070dbf91fd3a1db173e130b78de561a.tar.gz |
Avoid using trash for certain temp files (Bug#6070).
* server.el (server-sentinel, server-start, server-force-delete):
* jka-compr.el (jka-compr-partial-uncompress)
(jka-compr-call-process, jka-compr-write-region, jka-compr-load):
* epg.el (epg--make-temp-file, epg-decrypt-string)
(epg-encrypt-string, epg-verify-string, epg-sign-string):
* diff.el (diff-sentinel): Bind delete-by-moving-to-trash to nil
before deleting (Bug#6070).
Diffstat (limited to 'lisp/server.el')
-rw-r--r-- | lisp/server.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/server.el b/lisp/server.el index d36b99cc5b6..56819112639 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -344,7 +344,9 @@ If CLIENT is non-nil, add a description of it to the logged message." ;; for possible servers before doing anything, so it *should* be ours. (and (process-contact proc :server) (eq (process-status proc) 'closed) - (ignore-errors (delete-file (process-get proc :server-file)))) + (ignore-errors + (let (delete-by-moving-to-trash) + (delete-file (process-get proc :server-file))))) (server-log (format "Status changed to %s: %s" (process-status proc) msg) proc) (server-delete-client proc)) @@ -517,7 +519,9 @@ To force-start a server, do \\[server-force-delete] and then ;; Delete the socket files made by previous server invocations. (if (not (eq t (server-running-p server-name))) ;; Remove any leftover socket or authentication file - (ignore-errors (delete-file server-file)) + (ignore-errors + (let (delete-by-moving-to-trash) + (delete-file server-file))) (setq server-mode nil) ;; already set by the minor mode code (display-warning 'server @@ -600,7 +604,7 @@ NAME defaults to `server-name'. With argument, ask for NAME." server-auth-dir server-socket-dir)))) (condition-case nil - (progn + (let (delete-by-moving-to-trash) (delete-file file) (message "Connection file %S deleted" file)) (file-error |