emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a158b35: Fix bug#26011


From: Michael Albinus
Subject: [Emacs-diffs] master a158b35: Fix bug#26011
Date: Wed, 8 Mar 2017 11:27:45 -0500 (EST)

branch: master
commit a158b351e754329c92f87178090df49824fdcb00
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix bug#26011
    
    * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer):
    Check, whether file is too large.  (Bug#26011)
---
 lisp/net/tramp-sh.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 071ef79..8561962 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2147,6 +2147,11 @@ file names."
 First arg OP is either `copy' or `rename' and indicates the operation.
 FILENAME is the source file, NEWNAME the target file.
 KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
+  ;; Check, whether file is too large.  Emacs checks in `insert-file-1'
+  ;; and `find-file-noselect', but that's not called here.
+  (abort-if-file-too-large
+   (tramp-compat-file-attribute-size (file-attributes (file-truename 
filename)))
+   (symbol-name op) filename)
   ;; We must disable multibyte, because binary data shall not be
   ;; converted.  We don't want the target file to be compressed, so we
   ;; let-bind `jka-compr-inhibit' to t.  `epa-file-handler' shall not



reply via email to

[Prev in Thread] Current Thread [Next in Thread]