diff options
author | jkeiser <jkeiser@opscode.com> | 2013-01-17 17:32:17 -0800 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-06-07 13:12:22 -0700 |
commit | b0498f8e9d9fb9683cf553d3940e5fdbc9e83f98 (patch) | |
tree | 3b62cd8cc9998b84e93396b2c90abe9e0ba487c4 /lib/chef/chef_fs/knife.rb | |
parent | 40812216e3d2b56caa26b5e8702c675c1d1b870f (diff) | |
download | chef-b0498f8e9d9fb9683cf553d3940e5fdbc9e83f98.tar.gz |
Fix issue where pwd cookbook path not detected correctly in Ruby 1.8.7
Diffstat (limited to 'lib/chef/chef_fs/knife.rb')
-rw-r--r-- | lib/chef/chef_fs/knife.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb index fded52fec5..6ffc54206f 100644 --- a/lib/chef/chef_fs/knife.rb +++ b/lib/chef/chef_fs/knife.rb @@ -125,7 +125,7 @@ class Chef realest_path = Chef::ChefFS::PathUtils.realest_path(path) if absolute_path[0,realest_path.length] == realest_path && (absolute_path.length == realest_path.length || - absolute_path[realest_path.length] =~ /#{PathUtils.regexp_path_separator}/) + absolute_path[realest_path.length,1] =~ /#{PathUtils.regexp_path_separator}/) relative_path = Chef::ChefFS::PathUtils::relative_to(absolute_path, realest_path) return relative_path == '.' ? "/#{name}" : "/#{name}/#{relative_path}" end |