they could be retrieved from the source directory. (Bug#9565)
+2011-09-22 Michael Albinus <michael.albinus@gmx.de>
+
+ * files.el (copy-directory): Set directory attributes only in case
+ they could be retrieved from the source directory. (Bug#9565)
+
2011-09-22 Dima Kogan <dkogan@secretsauce.net> (tiny change)
* progmodes/hideshow.el (hs-looking-at-block-start-p)
(copy-file file target t keep-time)))))
;; Set directory attributes.
- (set-file-modes newname (file-modes directory))
- (if keep-time
- (set-file-times newname (nth 5 (file-attributes directory)))))))
+ (let ((modes (file-modes directory))
+ (times (and keep-time (nth 5 (file-attributes directory)))))
+ (if modes (set-file-modes newname modes))
+ (if times (set-file-times newname times))))))
\f
(put 'revert-buffer-function 'permanent-local t)
(defvar revert-buffer-function nil