summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/type/pfile.rb3
-rwxr-xr-xtest/types/symlink.rb3
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