summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type/pfile.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb
index 2551106a8..7035cf2dd 100644
--- a/lib/puppet/type/pfile.rb
+++ b/lib/puppet/type/pfile.rb
@@ -230,6 +230,10 @@ module Puppet
self.fail "You cannot specify both content and a source"
end
end
+
+ def self.[](path)
+ super(path.gsub(/\/+/, '/').sub(/\/$/, ''))
+ end
# List files, but only one level deep.
def self.list(base = "/")