Handle the empty mount accessor case. (#14507)
This commit is contained in:
parent
ada3d31dd1
commit
9e18350cf4
|
@ -2099,11 +2099,15 @@ func (a *ActivityLog) precomputedQueryWorker(ctx context.Context) error {
|
||||||
mountRecord := make([]*activity.MountRecord, 0, len(nsMap[nsID].Mounts))
|
mountRecord := make([]*activity.MountRecord, 0, len(nsMap[nsID].Mounts))
|
||||||
for mountAccessor, mountData := range nsMap[nsID].Mounts {
|
for mountAccessor, mountData := range nsMap[nsID].Mounts {
|
||||||
var displayPath string
|
var displayPath string
|
||||||
valResp := a.core.router.ValidateMountByAccessor(mountAccessor)
|
if mountAccessor == "" {
|
||||||
if valResp == nil {
|
displayPath = "no mount accessor (pre-1.10 upgrade?)"
|
||||||
displayPath = fmt.Sprintf("deleted mount; accessor %q", mountAccessor)
|
|
||||||
} else {
|
} else {
|
||||||
displayPath = valResp.MountPath
|
valResp := a.core.router.ValidateMountByAccessor(mountAccessor)
|
||||||
|
if valResp == nil {
|
||||||
|
displayPath = fmt.Sprintf("deleted mount; accessor %q", mountAccessor)
|
||||||
|
} else {
|
||||||
|
displayPath = valResp.MountPath
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mountRecord = append(mountRecord, &activity.MountRecord{
|
mountRecord = append(mountRecord, &activity.MountRecord{
|
||||||
|
|
Loading…
Reference in New Issue