The ending slash in resource file name gets stripped off by the File.split operation in munge(). This patch adds it back again.
Signed-off-by: Marc Fournier <[email protected]> --- lib/puppet/type/file.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 34dc445..b870d48 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -39,7 +39,8 @@ module Puppet # path name. The aim is to use less storage for all common paths in a hierarchy munge do |value| path, name = File.split(value) - { :index => Puppet::FileCollection.collection.index(path), :name => name } + terminator = (value[-1,1] == File::SEPARATOR) ? File::SEPARATOR : '' + { :index => Puppet::FileCollection.collection.index(path), :name => name + terminator } end # and the reverse -- 1.6.3.3 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
