From ea73cdbec49f9451d04902e69ad9fe4bf07a3c11 Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 31 Jan 2007 19:37:31 +0000 Subject: 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 --- lib/puppet/type/pfile.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit