diff options
| author | Michael Albinus | 2022-02-04 11:59:56 +0100 |
|---|---|---|
| committer | Michael Albinus | 2022-02-04 11:59:56 +0100 |
| commit | 37c433e4e281077488a72eb7a7cc6a33202317ae (patch) | |
| tree | a6cae677dd7167b52e2d9bbbbe57c88279ad98e0 | |
| parent | 97966c5154bb842a3e5d04a003feadf7d761259b (diff) | |
| download | emacs-37c433e4e281077488a72eb7a7cc6a33202317ae.tar.gz emacs-37c433e4e281077488a72eb7a7cc6a33202317ae.zip | |
* lisp/net/tramp-gvfs.el (tramp-gvfs-send-command): Fix problem with locale.
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 221ee547a2b..763a9e849fa 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -2246,13 +2246,7 @@ connection if a previous connection has died for some reason." | |||
| 2246 | COMMAND is a command from the gvfs-* utilities. It is replaced | 2246 | COMMAND is a command from the gvfs-* utilities. It is replaced |
| 2247 | by the corresponding gio tool call if available. `call-process' | 2247 | by the corresponding gio tool call if available. `call-process' |
| 2248 | is applied, and it returns t if the return code is zero." | 2248 | is applied, and it returns t if the return code is zero." |
| 2249 | (let* ((locale (tramp-get-local-locale vec)) | 2249 | (let ((locale (tramp-get-local-locale vec))) |
| 2250 | (process-environment | ||
| 2251 | (append | ||
| 2252 | `(,(format "LANG=%s" locale) | ||
| 2253 | ,(format "LANGUAGE=%s" locale) | ||
| 2254 | ,(format "LC_ALL=%s" locale)) | ||
| 2255 | process-environment))) | ||
| 2256 | (when (tramp-gvfs-gio-tool-p vec) | 2250 | (when (tramp-gvfs-gio-tool-p vec) |
| 2257 | ;; Use gio tool. | 2251 | ;; Use gio tool. |
| 2258 | (setq args (cons (cdr (assoc command tramp-gvfs-gio-mapping)) | 2252 | (setq args (cons (cdr (assoc command tramp-gvfs-gio-mapping)) |
| @@ -2262,7 +2256,14 @@ is applied, and it returns t if the return code is zero." | |||
| 2262 | (with-current-buffer (tramp-get-connection-buffer vec) | 2256 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 2263 | (tramp-gvfs-maybe-open-connection vec) | 2257 | (tramp-gvfs-maybe-open-connection vec) |
| 2264 | (erase-buffer) | 2258 | (erase-buffer) |
| 2265 | (or (zerop (apply #'tramp-call-process vec command nil t nil args)) | 2259 | (or (zerop |
| 2260 | (apply | ||
| 2261 | #'tramp-call-process vec "env" nil t nil | ||
| 2262 | (append `(,(format "LANG=%s" locale) | ||
| 2263 | ,(format "LANGUAGE=%s" locale) | ||
| 2264 | ,(format "LC_ALL=%s" locale) | ||
| 2265 | ,command) | ||
| 2266 | args))) | ||
| 2266 | ;; Remove information about mounted connection. | 2267 | ;; Remove information about mounted connection. |
| 2267 | (and (tramp-flush-file-properties vec "/") nil))))) | 2268 | (and (tramp-flush-file-properties vec "/") nil))))) |
| 2268 | 2269 | ||