Skip to content

Commit

Permalink
reactivated masterKdTree path & version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
haraldsteinlechner committed Jun 11, 2024
1 parent 9241aeb commit e401124
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.7.1
- reactivated master kdtree path

### 1.7.0
- Optimized KdTree loading

Expand Down
7 changes: 3 additions & 4 deletions src/OPCViewer.Base/KdTrees.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e401124

Please sign in to comment.