From e401124e7636133a2e2ac26b5316d1662a0a1d0c Mon Sep 17 00:00:00 2001 From: Harald Steinlechner Date: Tue, 11 Jun 2024 18:29:18 +0200 Subject: [PATCH] reactivated masterKdTree path & version bump --- RELEASE_NOTES.md | 3 +++ src/OPCViewer.Base/KdTrees.fs | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 873b7c6..41a4051 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 1.7.1 +- reactivated master kdtree path + ### 1.7.0 - Optimized KdTree loading diff --git a/src/OPCViewer.Base/KdTrees.fs b/src/OPCViewer.Base/KdTrees.fs index d30b826..eebe348 100644 --- a/src/OPCViewer.Base/KdTrees.fs +++ b/src/OPCViewer.Base/KdTrees.fs @@ -112,6 +112,7 @@ module KdTrees = // try fixing relative paths. match tryExpandKdTreePath paths.Opc_DirAbsPath l with | Some o -> + Log.warn "[KdTrees] repaired KdTree path %s => %s." l.kdtreePath o.kdtreePath o | None -> failwithf "[KdTrees] could not fix KdTree path: %s" l.kdtreePath @@ -231,9 +232,7 @@ module KdTrees = if missingKd0Paths.Length > 0 then Log.line "[KdTrees] missing kd0 paths: %d/%d" missingKd0Paths.Length kd0Paths.Length - let allKd0Available = Array.isEmpty missingKd0Paths - - if allKd0Available || ignoreMasterKdTree || forceRebuild then + if ignoreMasterKdTree || forceRebuild || (tryFixPatchFileIfNeeded masterKdPath).IsNone then Log.line "Found master kdtree and patch trees" Log.startTimed "building lazy kdtree cache" @@ -291,7 +290,7 @@ module KdTrees = if File.Exists kdPath then Some kdPath else None elif forceRebuild then createConcreteTree() |> ignore - if File.Exists kdPath then Some kdPath else None + Some kdPath else Some kdPath else