summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler/fileserver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/handler/fileserver.rb')
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index e6378bf01..3ee4721f3 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -568,12 +568,14 @@ class Puppet::Network::Handler
@path = nil
end
+ @files = {}
+
super()
end
def fileobj(path, links, client)
obj = nil
- if obj = Puppet.type(:file)[file_path(path, client)]
+ if obj = @files[file_path(path, client)]
# 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
@@ -584,6 +586,7 @@ class Puppet::Network::Handler
:name => file_path(path, client),
:check => CHECKPARAMS
)
+ @files[file_path(path, client)] = obj
end
if links == :manage
@@ -600,7 +603,7 @@ class Puppet::Network::Handler
# Read the contents of the file at the relative path given.
def read_file(relpath, client)
- File.read(file_path(relpath, client))
+ File.read(file_path(relpath, client))
end
# Cache this manufactured map, since if it's used it's likely