diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/net/eww.el | 10 | 
2 files changed, 10 insertions, 4 deletions
| diff --git a/lisp/ChangeLog b/lisp/ChangeLog index badc5be27f9..379a1ec9f7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-06-27  Leo Liu  <sdl.web@gmail.com> + +	* net/eww.el (eww-read-bookmarks): Check file size. +  2013-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>  	* emacs-lisp/nadvice.el (advice--defalias-fset): Move advice back to diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 3579f656a1d..63fe930b4ae 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -965,10 +965,12 @@ The browser to used is specified by the `shr-external-browser' variable."      (pp eww-bookmarks (current-buffer))))  (defun eww-read-bookmarks () -  (with-temp-buffer -    (insert-file-contents -     (expand-file-name "eww-bookmarks" user-emacs-directory)) -    (setq eww-bookmarks (read (current-buffer))))) +  (let ((file (expand-file-name "eww-bookmarks" user-emacs-directory))) +    (setq eww-bookmarks +	  (unless (zerop (or (nth 7 (file-attributes file)) 0)) +	    (with-temp-buffer +	      (insert-file-contents file) +	      (read (current-buffer)))))))  (defun eww-list-bookmarks ()    "Display the bookmarks." | 
