summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-31 19:37:31 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-31 19:37:31 +0000
commitea73cdbec49f9451d04902e69ad9fe4bf07a3c11 (patch)
treeaeabcb9489e72f86b8427ff991150bec12277dda /lib/puppet
parentd7fde427ad38329c8ad044ce3a13e88d156ebaa6 (diff)
downloadpuppet-ea73cdbec49f9451d04902e69ad9fe4bf07a3c11.tar.gz
puppet-ea73cdbec49f9451d04902e69ad9fe4bf07a3c11.tar.xz
puppet-ea73cdbec49f9451d04902e69ad9fe4bf07a3c11.zip
Fixing Files to work with the Resource server. Basically I just remove the "target" value if it is a nullop, so that it does not cause a conflict with "contents" on the far side.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2136 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/pfile.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb
index f87a1e201..650c7ad26 100644
--- a/lib/puppet/type/pfile.rb
+++ b/lib/puppet/type/pfile.rb
@@ -925,6 +925,17 @@ module Puppet
return @stat
end
+ # We have to hack this just a little bit, because otherwise we'll get
+ # an error when the target and the contents are created as states on
+ # the far side.
+ def to_trans
+ obj = super
+ if obj[:target] == :notlink
+ obj.delete(:target)
+ end
+ obj
+ end
+
def uri2obj(source)
sourceobj = FileSource.new
path = nil