summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/pfile.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb
index 62524f37b..bec0a4dd2 100644
--- a/lib/puppet/type/pfile.rb
+++ b/lib/puppet/type/pfile.rb
@@ -669,12 +669,12 @@ module Puppet
# path names, rather than including the full parent's title each
# time.
def pathbuilder
- if defined? @resource
+ if defined? @parent
# We only need to behave specially when our parent is also
# a file
- if @resource.is_a?(self.class)
+ if @parent.is_a?(self.class)
# Remove the parent file name
- list = @resource.pathbuilder
+ list = @parent.pathbuilder
list.pop # remove the parent's path info
return list << self.ref
else