Updating filepath in auto plugin if existing zone's file changes location (#1901) (#1910)

Exporting Zone.File to avoid getters and setters

Updating getter and setter for Zone.File to be less racy

Renaming GetFile to File in zone plugin
This commit is contained in:
Joey Espinosa
2018-07-03 06:20:39 -04:00
committed by Miek Gieben
parent 908d4fbd23
commit c2780f42c4
4 changed files with 68 additions and 5 deletions

View File

@@ -31,9 +31,10 @@ func (a Auto) Walk() error {
return nil
}
if _, ok := a.Zones.Z[origin]; ok {
if z, ok := a.Zones.Z[origin]; ok {
// we already have this zone
toDelete[origin] = false
z.SetFile(path)
return nil
}