From d7a75c5289c257d2b6782976e494efe81f04478b Mon Sep 17 00:00:00 2001 From: luke Date: Sun, 12 Mar 2006 03:19:53 +0000 Subject: Fixing small bug in symlink recursion git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1015 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/type/pfile.rb | 3 +-- test/types/symlink.rb | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index d6f0ef836..69246f8a8 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -333,11 +333,10 @@ module Puppet # We specifically look in @parameters here, because 'linkmaker' isn't # a valid attribute for subclasses, so using 'self[:linkmaker]' throws # an error. - if @parameters.include?(:linkmaker) and @parameters[:linkmaker] == true and + if @parameters.include?(:linkmaker) and args.include?(:source) and ! FileTest.directory?(args[:source]) klass = Puppet.type(:symlink) - self.debug "%s is a link" % path # clean up the args a lot for links old = args.dup args = { diff --git a/test/types/symlink.rb b/test/types/symlink.rb index eb6b9a04d..ace726ac5 100755 --- a/test/types/symlink.rb +++ b/test/types/symlink.rb @@ -82,7 +82,8 @@ class TestSymlink < Test::Unit::TestCase FileUtils.cd(path) { list.each { |file| unless FileTest.directory?(file) - assert(FileTest.symlink?(file)) + assert(FileTest.symlink?(file), "file %s is not a symlink" % + file) target = File.readlink(file) assert_equal(target,File.join(source,file.sub(/^\.\//,''))) end -- cgit