From bcb98b514714ef003fd218ccf894bd175bbd2c51 Mon Sep 17 00:00:00 2001 From: Grygoriy Fuchedzhy Date: Fri, 7 Oct 2011 23:16:21 +0300 Subject: [PATCH] copy permissions from original for text files --- hyde/generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyde/generator.py b/hyde/generator.py index 040ce70..6649b9e 100644 --- a/hyde/generator.py +++ b/hyde/generator.py @@ -13,6 +13,7 @@ from hyde.site import Node, Resource from contextlib import contextmanager from datetime import datetime +from shutil import copymode from hyde.util import getLoggerWithNullHandler logger = getLoggerWithNullHandler('hyde.engine') @@ -334,6 +335,7 @@ class Generator(object): resource.relative_deploy_path)) target.parent.make() target.write(text) + copymode(resource.source_file.path, target.path) else: logger.debug("Copying binary file [%s]", resource) self.events.begin_binary_resource(resource)