summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-01-19 15:14:37 -0800
committerMarkus Roberts <Markus@reality.com>2010-01-19 15:14:37 -0800
commitd4319a5418ce84ac83f9137cf1b7255210833eb4 (patch)
tree8420a490107ab4bf5b67869c382999912e8e8be4 /lib/puppet/file_serving
parentcdcbdc78bc399a60afaf36b6267688e72081fb6e (diff)
downloadpuppet-d4319a5418ce84ac83f9137cf1b7255210833eb4.tar.gz
puppet-d4319a5418ce84ac83f9137cf1b7255210833eb4.tar.xz
puppet-d4319a5418ce84ac83f9137cf1b7255210833eb4.zip
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.
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r--lib/puppet/file_serving/mount/file.rb2
1 files changed, 1 insertions, 1 deletions
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