summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r--lib/chef/cookbook_version.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 76e6d152b2..1503add33a 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -660,7 +660,7 @@ class Chef
def parse_segment_file_from_root_paths(segment, segment_file)
root_paths.each do |root_path|
- pathname = Pathname.new(segment_file).relative_path_from(Pathname.new(root_path))
+ pathname = Chef::Util::PathHelper.relative_path_from(root_path, segment_file)
parts = pathname.each_filename.take(2)
# Check if path is actually under root_path