+2010-07-30 Leo <sdl.web@gmail.com>
+
+ * eshell/esh-io.el (eshell-get-target): Better detection of
+ read-only file (Bug#6762).
+
2010-07-30 Juanma Barranquero <lekktu@gmail.com>
* align.el (align-default-spacing): Doc fix.
(let* ((exists (get-file-buffer target))
(buf (find-file-noselect target t)))
(with-current-buffer buf
- (if buffer-read-only
+ (if buffer-file-read-only
(error "Cannot write to read-only file `%s'" target))
+ (setq buffer-read-only nil)
(set (make-local-variable 'eshell-output-file-buffer)
(if (eq exists buf) 0 t))
(cond ((eq mode 'overwrite)