diff options
| author | Michael Albinus | 2017-03-08 17:27:24 +0100 |
|---|---|---|
| committer | Michael Albinus | 2017-03-08 17:27:24 +0100 |
| commit | a158b351e754329c92f87178090df49824fdcb00 (patch) | |
| tree | 2a0bd7db58b3233de1c46342f52acafdd5617ee1 | |
| parent | b82df00445725211d868a67cae1869d2f95270b6 (diff) | |
| download | emacs-a158b351e754329c92f87178090df49824fdcb00.tar.gz emacs-a158b351e754329c92f87178090df49824fdcb00.zip | |
Fix bug#26011
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer):
Check, whether file is too large. (Bug#26011)
| -rw-r--r-- | lisp/net/tramp-sh.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 071ef7982af..85619621d90 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2147,6 +2147,11 @@ file names." | |||
| 2147 | First arg OP is either `copy' or `rename' and indicates the operation. | 2147 | First arg OP is either `copy' or `rename' and indicates the operation. |
| 2148 | FILENAME is the source file, NEWNAME the target file. | 2148 | FILENAME is the source file, NEWNAME the target file. |
| 2149 | KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." | 2149 | KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." |
| 2150 | ;; Check, whether file is too large. Emacs checks in `insert-file-1' | ||
| 2151 | ;; and `find-file-noselect', but that's not called here. | ||
| 2152 | (abort-if-file-too-large | ||
| 2153 | (tramp-compat-file-attribute-size (file-attributes (file-truename filename))) | ||
| 2154 | (symbol-name op) filename) | ||
| 2150 | ;; We must disable multibyte, because binary data shall not be | 2155 | ;; We must disable multibyte, because binary data shall not be |
| 2151 | ;; converted. We don't want the target file to be compressed, so we | 2156 | ;; converted. We don't want the target file to be compressed, so we |
| 2152 | ;; let-bind `jka-compr-inhibit' to t. `epa-file-handler' shall not | 2157 | ;; let-bind `jka-compr-inhibit' to t. `epa-file-handler' shall not |