engine: resources: file: Fix bug preventing use of source field

This patch fixes a previously undiscovered bug which prevented
the use of the source field in the file resource. CheckApply was
returning early if obj.Content was nil. It is also necessary to
check that obj.Source is empty before returning, otherwise
syncCheckApply never runs.
This commit is contained in:
Jonathan Gold
2018-12-06 05:35:29 -05:00
committed by James Shubin
parent d2bab32b0e
commit b902e2d30b

View File

@@ -608,7 +608,7 @@ func (obj *FileRes) contentCheckApply(apply bool) (checkOK bool, _ error) {
}
// content is not defined, leave it alone...
if obj.Content == nil {
if obj.Content == nil && obj.Source == "" {
return true, nil
}