Commit ff3d86d0 authored by Leo Liu's avatar Leo Liu
Browse files

* lisp/files.el (dir-locals-read-from-file): Check file non-empty

before reading.

Fixes: debbugs:13038
parent b9cf4db5
2012-12-01 Leo Liu <sdl.web@gmail.com>
* files.el (dir-locals-read-from-file): Check file non-empty
before reading. (Bug#13038)
2012-11-28 Glenn Morris <rgm@gnu.org>
 
* jka-cmpr-hook.el (jka-compr-get-compression-info):
......
......@@ -3625,14 +3625,15 @@ is found. Returns the new class name."
(condition-case err
(progn
(insert-file-contents file)
(let* ((dir-name (file-name-directory file))
(class-name (intern dir-name))
(variables (let ((read-circle nil))
(read (current-buffer)))))
(dir-locals-set-class-variables class-name variables)
(dir-locals-set-directory-class dir-name class-name
(nth 5 (file-attributes file)))
class-name))
(unless (zerop (buffer-size))
(let* ((dir-name (file-name-directory file))
(class-name (intern dir-name))
(variables (let ((read-circle nil))
(read (current-buffer)))))
(dir-locals-set-class-variables class-name variables)
(dir-locals-set-directory-class dir-name class-name
(nth 5 (file-attributes file)))
class-name)))
(error (message "Error reading dir-locals: %S" err) nil)))))
(defcustom enable-remote-dir-locals nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment