diff options
| author | Luke Kanies <luke@madstop.com> | 2005-07-11 22:40:35 +0000 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2005-07-11 22:40:35 +0000 |
| commit | 81777002df44d361ec5ca2b05cab861bc2b726da (patch) | |
| tree | d16d7480e52379f0756b654bfdd84e158c18493e /lib | |
| parent | 01a9905c0c20320a27a646bd7414384be783fdcb (diff) | |
| download | puppet-81777002df44d361ec5ca2b05cab861bc2b726da.tar.gz puppet-81777002df44d361ec5ca2b05cab861bc2b726da.tar.xz puppet-81777002df44d361ec5ca2b05cab861bc2b726da.zip | |
hopefully, finally resolving recursive file creation problems
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@363 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/pfile.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 94ef94736..743c85f07 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -414,7 +414,7 @@ module Puppet @stat = nil # if recursion is enabled and we're a directory... - if @parameters[:recurse] and FileTest.exist?(self[:path]) and + if @parameters[:recurse] and FileTest.exist?(self.name) and self.stat.directory? recurse = self[:recurse] # we might have a string, rather than a number @@ -440,10 +440,13 @@ module Puppet @children = [] end - Dir.foreach(self[:path]) { |file| + # make sure we don't have any remaining ':name' params + self.nameclean(arghash) + + Dir.foreach(self.name) { |file| next if file =~ /^\.\.?/ # skip . and .. - arghash[:path] = File.join(self[:path],file) + arghash[:path] = File.join(self.name,file) child = nil # if the file already exists... @@ -453,6 +456,8 @@ module Puppet child[var] = value } else # create it anew + #Puppet.notice "Creating new file with args %s" % + # arghash.inspect child = self.class.new(arghash) end @children.push child |
