summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/handler')
-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