Get the logger to log the cleaned mount paths as well

This commit is contained in:
Matthew Penner 2020-07-04 15:38:44 -06:00
parent 9f95efa3ae
commit f3419495cd

View File

@ -679,17 +679,19 @@ func (d *DockerEnvironment) Create() error {
continue continue
} }
target := filepath.Clean(m.Target)
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"server": d.Server.Uuid, "server": d.Server.Uuid,
"source": m.Source, "source": source,
"target": m.Target, "target": target,
"read_only": m.ReadOnly, "read_only": m.ReadOnly,
}).Debug("attaching mount to server's container") }).Debug("attaching mount to server's container")
mounts = append(mounts, mount.Mount{ mounts = append(mounts, mount.Mount{
Type: mount.TypeBind, Type: mount.TypeBind,
Source: source, Source: source,
Target: filepath.Clean(m.Target), Target: target,
ReadOnly: m.ReadOnly, ReadOnly: m.ReadOnly,
}) })
} }