Preserve line-ending encoding of single-file packages

See #619
This commit is contained in:
Steve Purcell 2013-03-27 18:22:09 +00:00
parent 919bb8bb32
commit 4e5b2905b4

View file

@ -714,10 +714,11 @@ FILES is a list of (SOURCE . DEST) relative filepath pairs."
cfg))) cfg)))
(when (file-exists-p pkg-target) (when (file-exists-p pkg-target)
(delete-file pkg-target t)) (delete-file pkg-target t))
(with-temp-buffer (copy-file pkg-source pkg-target)
(insert-file-contents pkg-source) (with-current-buffer (find-file pkg-target)
(pb/update-or-insert-version version) (pb/update-or-insert-version version)
(write-file pkg-target)) (write-file pkg-target nil)
(kill-buffer))
(pb/write-pkg-readme (and (> (length pkg-info) 4) (aref pkg-info 4)) (pb/write-pkg-readme (and (> (length pkg-info) 4) (aref pkg-info 4))
file-name) file-name)