Skip to content

Commit 0030f49

Browse files
author
Chen Bin
committed
clean code
1 parent 2e0f0d7 commit 0030f49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lisp/init-utils.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ If HINT is empty, use symbol at point."
232232

233233
(defun my-file-too-big-p (file)
234234
"Test if FILE is too big."
235-
(> (nth 7 (file-attributes file))
236-
(* 5000 64)))
235+
(let ((file-size (nth 7 (file-attributes file))))
236+
;; file might not exist
237+
(and file-size (> file-size (* 5000 64)))))
237238

238239
(defvar my-force-buffer-file-temp-p nil)
239240
(defun my-buffer-file-temp-p ()

0 commit comments

Comments
 (0)