diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-18 11:21:22 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-18 11:21:22 -0600 |
commit | c19835ce9f8a5138b30a1a32ca741c996b0916d2 (patch) | |
tree | 1a7b05839f013cc8a610f7c9493e206606fab977 /lib/puppet/network/handler/fileserver.rb | |
parent | 9290cc89a2206fb5204578f8e91208857a48b147 (diff) | |
download | puppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.tar.gz puppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.tar.xz puppet-c19835ce9f8a5138b30a1a32ca741c996b0916d2.zip |
Fixed most failing tests, but there are still over thirty failing.
At this point, I'm holding the experiment until after the release,
so I'm committing this for now and will take it back up after 0.24.0
is out.
Diffstat (limited to 'lib/puppet/network/handler/fileserver.rb')
-rwxr-xr-x | lib/puppet/network/handler/fileserver.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index dd00450be..7a5a1fe9a 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -551,22 +551,25 @@ class Puppet::Network::Handler @path = nil end + @cache = {} + super() end def fileobj(path, links) obj = nil - if obj = Puppet.type(:file)[path] + if obj = @cache[path] # This can only happen in local fileserving, but it's an # important one. It'd be nice if we didn't just set # the check params every time, but I'm not sure it's worth # the effort. obj[:check] = CHECKPARAMS else - obj = Puppet.type(:file).create( + obj = Puppet::Type.type(:file).create( :name => path, :check => CHECKPARAMS ) + @cache[path] = obj end if links == :manage |