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:
committed by
James Shubin
parent
d2bab32b0e
commit
b902e2d30b
@@ -608,7 +608,7 @@ func (obj *FileRes) contentCheckApply(apply bool) (checkOK bool, _ error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// content is not defined, leave it alone...
|
// content is not defined, leave it alone...
|
||||||
if obj.Content == nil {
|
if obj.Content == nil && obj.Source == "" {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user