summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/path_utils.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-01-04 16:53:12 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:16 -0700
commitf9902ce0d14ee0f69726c69c128fd0d2c5c2b616 (patch)
tree4d117e99e0b2e864fa70b9f0e4d0a4030147be36 /lib/chef/chef_fs/path_utils.rb
parent2b450f0606bd29cb65b9da59f4480aa1e87b5c15 (diff)
downloadchef-f9902ce0d14ee0f69726c69c128fd0d2c5c2b616.tar.gz
Fix issue where cwd=cookbooks/cookbook1 listed everything at /
Diffstat (limited to 'lib/chef/chef_fs/path_utils.rb')
-rw-r--r--lib/chef/chef_fs/path_utils.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/path_utils.rb b/lib/chef/chef_fs/path_utils.rb
index 4fd8f8610e..a034bea66e 100644
--- a/lib/chef/chef_fs/path_utils.rb
+++ b/lib/chef/chef_fs/path_utils.rb
@@ -79,6 +79,10 @@ class Chef
end
end
end
+
+ def self.is_absolute?(path)
+ path =~ /^#{regexp_path_separator}/
+ end
end
end
end