(#6107) Fix an error when auditing a file with empty content
The manifest:
file { "/tmp/foo" :
ensure => present, audit => content,
}
produced the error:
err: /Stage[main]//File[/tmp/foo]/ensure: change from absent to present
failed: Could not retrieve content for from filebucket: private method `sub' called for nil:NilClass at
/Users/matthewrobinson/work/puppet/test.pp:4
This was due to logic in content assuming that if you didn't specify
content while you were auditing it you must have specified a source.
The code paths in the file type badly need a cleanup so that these sorts
of errors aren't so difficult to track down and things are easier to
test.
Paired-with: Daniel Pittman