Fixes an indexing issue in DirectedGraph.

The issue was linked to absolute paths being prepended.
remotes/1708105384931250775/master
Luka Vandervelden 2020-10-29 14:27:37 +01:00
parent 0599e8bfe5
commit 909eb776e3
1 changed files with 3 additions and 1 deletions

View File

@ -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