From d4319a5418ce84ac83f9137cf1b7255210833eb4 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Tue, 19 Jan 2010 15:14:37 -0800 Subject: Minimal fix for #3001 (failing to fetch metadata on dangling symlink) FileTest.exists? returns false if the target of a symlink is missing; in such cases we still want to continue if the resource is a symlink, as we may be managing a dangling symlink. Continuing in such case either gives the desired behavior or a more specific/informative error message. --- lib/puppet/file_serving/mount/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/file_serving/mount/file.rb b/lib/puppet/file_serving/mount/file.rb index 4309ef79a..197a7206c 100644 --- a/lib/puppet/file_serving/mount/file.rb +++ b/lib/puppet/file_serving/mount/file.rb @@ -25,7 +25,7 @@ class Puppet::FileServing::Mount::File < Puppet::FileServing::Mount file = ::File.join(full_path, relative_path) - if ! FileTest.exist?(file) + if !(FileTest.exist?(file) )# or FileTest.symlink?(file)) Puppet.info("File does not exist or is not accessible: #{file}") return nil end -- cgit