summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorBrice Figureau <brice@daysofwonder.com>2008-10-08 14:37:44 +0200
committerJames Turnbull <james@lovedthanlost.net>2008-10-09 07:48:33 +1100
commit4265825096677f596a6b8a2274e0bb802a60904c (patch)
tree0f6ac19a07ca833e63c90045b9c00385506e978f /lib/puppet
parent9c31db9500d79f29c5e5e1419ab4f616a7a2ed88 (diff)
downloadpuppet-4265825096677f596a6b8a2274e0bb802a60904c.tar.gz
puppet-4265825096677f596a6b8a2274e0bb802a60904c.tar.xz
puppet-4265825096677f596a6b8a2274e0bb802a60904c.zip
Fix #1636 - part2 - correct some client errors.
#1636 original patch was incomplete, and on some cases, the client could report: "Failed to generate additional resources during transaction: None of the provided sources exist" The server was trying to recurse when asking to list files and thus was returning an empty response instead of a "file" response.
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index d87eb83fa..815d0ba82 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -722,9 +722,13 @@ class Puppet::Network::Handler
valid_modules.each do |m|
modpath = mod_file_path(m, relpath, client)
if FileTest.exists?(modpath)
- ary = reclist(modpath, recurse, ignore)
- ary = [] if ary.nil?
- result += ary
+ if FileTest.directory?(modpath) and recurse
+ ary = reclist(modpath, recurse, ignore)
+ ary = [] if ary.nil?
+ result += ary
+ else
+ result += [["/", File.stat(modpath).ftype]]
+ end
end
end
result