saltstack/salt — pull request #9615 by terminalmage (2014-01-07 17:51:51+00:00)
Title: Fix regression in salt.utils.copyfile()

In pull request #9599, I added code to make salt.utils.copyfile() set
the ownership and permissions of the new file to those of the
pre-existing file. However, this raises an exception when the
destination file doesn't exist, which happens on file.managed states
which are creating new files.

This commit fixes that regression.