Thanks to Stig Sandbeck Mathisen for the fix

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513309

Signed-off-by: James Turnbull <[email protected]>
---
 lib/puppet/type/tidy.rb |    2 +-
 spec/unit/type/tidy.rb  |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index b5ccb3f..3d7190c 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -139,7 +139,7 @@ Puppet::Type.newtype(:tidy) do
         end
 
         def tidy?(path, stat)
-            if stat.size > value
+            if stat.size >= value
                 return true
             else
                 return false
diff --git a/spec/unit/type/tidy.rb b/spec/unit/type/tidy.rb
index 88e2e28..ccec9ed 100755
--- a/spec/unit/type/tidy.rb
+++ b/spec/unit/type/tidy.rb
@@ -273,6 +273,12 @@ describe tidy do
 
                 @sizer.must be_tidy("/what/ever", @stat)
             end
+
+            it "should return true if the file is equal to the specified size" 
do
+                @stat.expects(:size).returns(1024)
+
+                @sizer.must be_tidy("/what/ever", @stat)
+            end
         end
 
         describe "and determining whether a file should be tidied" do
-- 
1.6.6

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to