summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-03-23 23:16:41 +0100
committerJames Turnbull <james@lovedthanlost.net>2009-03-27 00:05:52 +1100
commitf089e115fd126e2fae664322b7a27cb31f0efd3d (patch)
tree169d1ae53623057efe284595f614d747ae8124d0 /lib/puppet
parent14762c3f3624a2b59685099548e7e106bd7b0b9d (diff)
downloadpuppet-f089e115fd126e2fae664322b7a27cb31f0efd3d.tar.gz
puppet-f089e115fd126e2fae664322b7a27cb31f0efd3d.tar.xz
puppet-f089e115fd126e2fae664322b7a27cb31f0efd3d.zip
Fix #2101 - fix recurselimit == 0 bad behaviour
After the fix for #1469, recurselimit = 0 was considered as an infinite recursion which is the reverse of what it was before. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/file_serving/fileset.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb
index 2076d0c4d..a6a4b62a1 100644
--- a/lib/puppet/file_serving/fileset.rb
+++ b/lib/puppet/file_serving/fileset.rb
@@ -67,7 +67,7 @@ class Puppet::FileServing::Fileset
@ignore = []
@links = :manage
@recurse = false
- @recurselimit = 0 # infinite recursion
+ @recurselimit = :infinite
if options.is_a?(Puppet::Indirector::Request)
initialize_from_request(options)
@@ -90,7 +90,7 @@ class Puppet::FileServing::Fileset
# place for all of the logic around recursion.
def recurse?(depth)
# recurse if told to, and infinite recursion or current depth not at the limit
- self.recurse and (self.recurselimit == 0 or depth <= self.recurselimit)
+ self.recurse and (self.recurselimit == :infinite or depth <= self.recurselimit)
end
def initialize_from_hash(options)