Merge pull request #834 from jonnytpuppet/alwiesner/master

Check that /var/lib/mysql actually contains files.
This commit is contained in:
JT (Jonny) 2016-05-09 18:36:48 +01:00
commit 2cf6000c55

View file

@ -57,7 +57,7 @@ Puppet::Type.type(:mysql_datadir).provide(:mysql, :parent => Puppet::Provider::M
def exists?
datadir = @resource[:datadir]
File.directory?("#{datadir}/mysql")
(File.directory?("#{datadir}/mysql")) && (Dir.entries("#{datadir}/mysql") - %w{ . .. }).any?
end
##