From c3c3a714e7fed1d5624cb151900e3a90004fff0a Mon Sep 17 00:00:00 2001 From: skilion Date: Tue, 15 Sep 2015 14:54:07 +0200 Subject: [PATCH] skip root directory --- src/itemdb.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/itemdb.d b/src/itemdb.d index b39503f0..095ff59e 100644 --- a/src/itemdb.d +++ b/src/itemdb.d @@ -223,7 +223,9 @@ final class ItemDatabase else path = r.front[0].dup; id = r.front[1].dup; } - return path[5 .. $]; // HACK: skip "root/" + // HACK: skip "root/" + if (path.length < 5) return null; + return path[5 .. $]; } /*private string computePath(const(char)[] name, const(char)[] parentId)