From 909eb776e391b88cdb2e8f1e631fd8e9792aaf93 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Thu, 29 Oct 2020 14:27:37 +0100 Subject: [PATCH] Fixes an indexing issue in DirectedGraph. The issue was linked to absolute paths being prepended. --- src/dodb/directed_graph.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dodb/directed_graph.cr b/src/dodb/directed_graph.cr index 6d96790..6e083cc 100644 --- a/src/dodb/directed_graph.cr +++ b/src/dodb/directed_graph.cr @@ -167,8 +167,10 @@ class DODB::DirectedGraph(V) < DODB::Indexer(V) "../../../../data/#{key}.json" end + # Roughly matches Index#file_path_index, but works if @storage_root + # is an absolute path as well. private def get_cross_index_data_symlink(node : String) - "../../../../../#{@index.file_path_index node}" + "../../../../../#{@index.indexing_directory}/#{node}.json" end end