diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/provider/vcsrepo.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo.rb b/lib/puppet/provider/vcsrepo.rb index 05b92f8..8793e63 100644 --- a/lib/puppet/provider/vcsrepo.rb +++ b/lib/puppet/provider/vcsrepo.rb @@ -19,7 +19,10 @@ class Puppet::Provider::Vcsrepo < Puppet::Provider def path_empty? # Path is empty if the only entries are '.' and '..' - Dir.entries(@resource.value(:path)).size == 2 + d = Dir.new(@resource.value(:path)) + d.read # should return '.' + d.read # should return '..' + d.read.nil? end # Note: We don't rely on Dir.chdir's behavior of automatically returning the |